fix wrong minosoft meta url migration

This commit is contained in:
Moritz Zwerger 2023-11-25 18:12:27 +01:00
parent c709ab939c
commit 920539f0c4
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ class ResourceProfileMigrationTest {
val data = mapOf( val data = mapOf(
"source" to mapOf( "source" to mapOf(
"pixlyzer" to "https://gitlab.bixilon.de/bixilon/pixlyzer-data/-/raw/master/hash/\${hashPrefix}/\${fullHash}.mbf?inline=false", "pixlyzer" to "https://gitlab.bixilon.de/bixilon/pixlyzer-data/-/raw/master/hash/\${hashPrefix}/\${fullHash}.mbf?inline=false",
"minosoft-meta" to "https://gitlab.bixilon.de/bixilon/minosoft-meta-bin/-/raw/master/\${hashPrefix}/\${fullHash}?ref_type=heads", "minosoft_meta" to "https://gitlab.bixilon.de/bixilon/minosoft-meta-bin/-/raw/master/\${hashPrefix}/\${fullHash}?ref_type=heads",
) )
) )
val tree = Jackson.MAPPER.valueToTree<ObjectNode>(data) val tree = Jackson.MAPPER.valueToTree<ObjectNode>(data)
@ -43,7 +43,7 @@ class ResourceProfileMigrationTest {
val data = mapOf( val data = mapOf(
"source" to mapOf( "source" to mapOf(
"pixlyzer" to "https://custom.bixilon.de/bixilon/pixlyzer-data/-/raw/master/hash/\${hashPrefix}/\${fullHash}.mbf?inline=false", "pixlyzer" to "https://custom.bixilon.de/bixilon/pixlyzer-data/-/raw/master/hash/\${hashPrefix}/\${fullHash}.mbf?inline=false",
"minosoft-meta" to "https://custom.bixilon.de/bixilon/minosoft-meta-bin/-/raw/master/\${hashPrefix}/\${fullHash}?ref_type=heads", "minosoft_meta" to "https://custom.bixilon.de/bixilon/minosoft-meta-bin/-/raw/master/\${hashPrefix}/\${fullHash}?ref_type=heads",
) )
) )
val tree = Jackson.MAPPER.valueToTree<ObjectNode>(data) val tree = Jackson.MAPPER.valueToTree<ObjectNode>(data)
@ -55,7 +55,7 @@ class ResourceProfileMigrationTest {
"pixlyzer" to listOf( "pixlyzer" to listOf(
"https://custom.bixilon.de/bixilon/pixlyzer-data/-/raw/master/hash/\${hashPrefix}/\${fullHash}.mbf?inline=false", "https://custom.bixilon.de/bixilon/pixlyzer-data/-/raw/master/hash/\${hashPrefix}/\${fullHash}.mbf?inline=false",
), ),
"minosoft-meta" to listOf( "minosoft_meta" to listOf(
"https://custom.bixilon.de/bixilon/minosoft-meta-bin/-/raw/master/\${hashPrefix}/\${fullHash}?ref_type=heads", "https://custom.bixilon.de/bixilon/minosoft-meta-bin/-/raw/master/\${hashPrefix}/\${fullHash}?ref_type=heads",
), ),
) )

View File

@ -31,7 +31,7 @@ object ResourceProfileMigration {
array.add(it) array.add(it)
source.replace("pixlyzer", array) source.replace("pixlyzer", array)
} }
source.remove("minosoft-meta")?.asText()?.let { source.remove("minosoft_meta")?.asText()?.let {
if (it == "https://gitlab.bixilon.de/bixilon/minosoft-meta-bin/-/raw/master/\${hashPrefix}/\${fullHash}?ref_type=heads") return@let if (it == "https://gitlab.bixilon.de/bixilon/minosoft-meta-bin/-/raw/master/\${hashPrefix}/\${fullHash}?ref_type=heads") return@let
val array = Jackson.MAPPER.createArrayNode() val array = Jackson.MAPPER.createArrayNode()
array.add(it) array.add(it)