Skip to content

Commit

Permalink
fix(stage): entity tags task succeeds (#3403)
Browse files Browse the repository at this point in the history
  • Loading branch information
emjburns authored Jan 31, 2020
1 parent ead2877 commit 4b677cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class AddServerGroupEntityTagsTask extends AbstractCloudProviderAwareTask implem
try {
List<Map> tagOperations = buildTagOperations(stage)
if (!tagOperations) {
return TaskResult.ofStatus(ExecutionStatus.SKIPPED)
return TaskResult.ofStatus(ExecutionStatus.SUCCEEDED)
}
TaskId taskId = kato.requestOperations(tagOperations).toBlocking().first()
return TaskResult.builder(ExecutionStatus.SUCCEEDED).context(new HashMap<String, Object>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class AddServerGroupEntityTagsTaskSpec extends Specification {
1 * katoService.requestOperations(_) >> { throw new RuntimeException("something went wrong") }
}

void "skips tagging when no tag generators or generators do not produce any tags"() {
void "just completes when no tag generators or generators do not produce any tags"() {
given:
AddServerGroupEntityTagsTask emptyTask = new AddServerGroupEntityTagsTask(kato: katoService, tagGenerators: [])

Expand All @@ -65,7 +65,7 @@ class AddServerGroupEntityTagsTaskSpec extends Specification {
def result = emptyTask.execute(stage)

then:
result.status == ExecutionStatus.SKIPPED
result.status == ExecutionStatus.SUCCEEDED
0 * _
}
}

0 comments on commit 4b677cc

Please sign in to comment.