From a4111d33f76206722944c05e0899e190284a9857 Mon Sep 17 00:00:00 2001 From: David An Date: Mon, 16 Dec 2024 12:21:14 -0500 Subject: [PATCH] fix tests --- .../dsde/firecloud/service/FireCloudDirectives.scala | 2 +- .../webservice/MethodConfigurationApiService.scala | 6 ++++++ .../firecloud/webservice/CromIamApiServiceSpec.scala | 10 ---------- .../MethodConfigurationApiServiceSpec.scala | 11 ----------- 4 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/main/scala/org/broadinstitute/dsde/firecloud/service/FireCloudDirectives.scala b/src/main/scala/org/broadinstitute/dsde/firecloud/service/FireCloudDirectives.scala index 1636a5b14..05505d7c7 100644 --- a/src/main/scala/org/broadinstitute/dsde/firecloud/service/FireCloudDirectives.scala +++ b/src/main/scala/org/broadinstitute/dsde/firecloud/service/FireCloudDirectives.scala @@ -41,7 +41,7 @@ object FireCloudDirectiveUtils { trait FireCloudDirectives extends Directives with RequestBuilding with RestJsonClient { @deprecated(message = "Use streamingPassthrough instead", since = "2024-11-16") - // 8 usages + 2 usages in test + // 5 usages + 2 usages in test def passthrough(unencodedPath: String, methods: HttpMethod*): Route = passthrough(Uri(unencodedPath), methods: _*) diff --git a/src/main/scala/org/broadinstitute/dsde/firecloud/webservice/MethodConfigurationApiService.scala b/src/main/scala/org/broadinstitute/dsde/firecloud/webservice/MethodConfigurationApiService.scala index e364ee83e..adf673a36 100644 --- a/src/main/scala/org/broadinstitute/dsde/firecloud/webservice/MethodConfigurationApiService.scala +++ b/src/main/scala/org/broadinstitute/dsde/firecloud/webservice/MethodConfigurationApiService.scala @@ -12,6 +12,12 @@ import org.broadinstitute.dsde.rawls.model.WorkspaceName import org.slf4j.LoggerFactory object MethodConfigurationApiService { + val remoteTemplatePath = FireCloudConfig.Rawls.authPrefix + "/methodconfigs/template" + val remoteTemplateURL = FireCloudConfig.Rawls.baseUrl + remoteTemplatePath + + val remoteInputsOutputsPath = FireCloudConfig.Rawls.authPrefix + "/methodconfigs/inputsOutputs" + val remoteInputsOutputsURL = FireCloudConfig.Rawls.baseUrl + remoteInputsOutputsPath + val remoteCopyFromMethodRepoConfigPath = FireCloudConfig.Rawls.authPrefix + "/methodconfigs/copyFromMethodRepo" val remoteCopyFromMethodRepoConfigUrl = FireCloudConfig.Rawls.baseUrl + remoteCopyFromMethodRepoConfigPath diff --git a/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/CromIamApiServiceSpec.scala b/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/CromIamApiServiceSpec.scala index a1bc86255..e2de195a0 100644 --- a/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/CromIamApiServiceSpec.scala +++ b/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/CromIamApiServiceSpec.scala @@ -37,16 +37,6 @@ class CromIamApiServiceSpec extends BaseServiceSpec with CromIamApiService with lazy val engineRoot: String = "/engine/v1" lazy val womtoolRoot: String = "/api/womtool/v1" - "/api/womtool/{version}/describe" - { - - val endpoint = s"$womtoolRoot/describe" - - "should pass through my methods" in { - checkIfPassedThrough(testableRoutes, HttpMethods.POST, endpoint, toBeHandled = true) - } - - } - "/api/workflows/{version}/abort" - { val endpoint = workflowRoot + "/my-bogus-workflow-id-565656/abort" diff --git a/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/MethodConfigurationApiServiceSpec.scala b/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/MethodConfigurationApiServiceSpec.scala index b390df7be..d4f069264 100644 --- a/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/MethodConfigurationApiServiceSpec.scala +++ b/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/MethodConfigurationApiServiceSpec.scala @@ -159,17 +159,6 @@ class MethodConfigurationApiServiceSpec extends ServiceSpec with MethodConfigura } } - s"GET, PUT, DELETE on $path" - { - "should receive a MethodNotAllowed" in { - List(HttpMethods.GET, HttpMethods.PUT, HttpMethods.DELETE) foreach { method => - new RequestBuilder(method)(path) ~> dummyUserIdHeaders("1234") ~> sealRoute( - methodConfigurationRoutes - ) ~> check { - status should equal(MethodNotAllowed) - } - } - } - } } val localMethodConfigPath = "/workspaces/%s/%s/method_configs/%s/%s".format(mockWorkspace.namespace,