From 81dcef8d091de6761445b11f60e7ff14a1c7188e Mon Sep 17 00:00:00 2001 From: Pranav-b-7 Date: Wed, 10 Apr 2024 12:07:19 +0530 Subject: [PATCH] refactor(test/applications): Cleanup impractical tests in UpsertApplicationTaskSpec The API call 'front50Service.get(application)' mocked/stubbed to return null value is not realistic, because if the application is not present, then this API would throw a 404 HTTP error. and hence this test is cleaned up. --- .../tasks/UpsertApplicationTaskSpec.groovy | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/orca-applications/src/test/groovy/com/netflix/spinnaker/orca/applications/tasks/UpsertApplicationTaskSpec.groovy b/orca-applications/src/test/groovy/com/netflix/spinnaker/orca/applications/tasks/UpsertApplicationTaskSpec.groovy index 50b91f8235..1d5de2c7a1 100644 --- a/orca-applications/src/test/groovy/com/netflix/spinnaker/orca/applications/tasks/UpsertApplicationTaskSpec.groovy +++ b/orca-applications/src/test/groovy/com/netflix/spinnaker/orca/applications/tasks/UpsertApplicationTaskSpec.groovy @@ -53,23 +53,6 @@ class UpsertApplicationTaskSpec extends Specification { } } - void "should create an application in global registries"() { - given: - def app = new Application(config.application + [user: config.user]) - task.front50Service = Mock(Front50Service) { - 1 * get(config.application.name) >> null - 1 * create(app) - 1 * updatePermission(*_) - 0 * _._ - } - - when: - def result = task.execute(pipeline.stages.first()) - - then: - result.status == ExecutionStatus.SUCCEEDED - } - void "should update existing application"() { given: Application application = new Application(config.application + [