Skip to content

Commit

Permalink
#1236 Promotion only if no promotion runs
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoraboeuf committed Dec 15, 2024
1 parent e1e4ac0 commit 69ad6b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class EnvironmentsBuildPromotionInfoExtensionIT : AbstractDSLTestSupport() {
val info = buildPromotionInfoService.getBuildPromotionInfo(this)

// Checking all items have been collected
assertEquals(11, info.items.size)
assertEquals(9, info.items.size)

// First, the slots & their pipelines

Expand Down Expand Up @@ -118,26 +118,16 @@ class EnvironmentsBuildPromotionInfoExtensionIT : AbstractDSLTestSupport() {
}

info.items[6].apply {
assertEquals(silver, promotionLevel)
assertEquals(silver, data)
}

info.items[7].apply {
assertEquals(silver, promotionLevel)
assertEquals(runSilver.id, (data as PromotionRun).id)
}

info.items[8].apply {
assertEquals(bronze, promotionLevel)
assertEquals(bronze, data)
}

info.items[9].apply {
info.items[7].apply {
assertEquals(bronze, promotionLevel)
assertEquals(runBronze2.id, (data as PromotionRun).id)
}

info.items[10].apply {
info.items[8].apply {
assertEquals(bronze, promotionLevel)
assertEquals(runBronze1.id, (data as PromotionRun).id)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,6 @@ class EnvironmentsBuildPromotionInfoExtensionGraphQLIT : AbstractQLKTITSupport()
"id" to gold.id.toString()
)
),
mapOf(
"promotionLevel" to mapOf(
"name" to silver.name,
),
"data" to mapOf(
"__typename" to "PromotionLevel",
"id" to silver.id.toString()
)
),
mapOf(
"promotionLevel" to mapOf(
"name" to silver.name,
Expand All @@ -179,15 +170,6 @@ class EnvironmentsBuildPromotionInfoExtensionGraphQLIT : AbstractQLKTITSupport()
"id" to runSilver.id.toString()
)
),
mapOf(
"promotionLevel" to mapOf(
"name" to bronze.name,
),
"data" to mapOf(
"__typename" to "PromotionLevel",
"id" to bronze.id.toString()
)
),
mapOf(
"promotionLevel" to mapOf(
"name" to bronze.name,
Expand Down

0 comments on commit 69ad6b8

Please sign in to comment.