summaryrefslogtreecommitdiffstats
path: root/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy')
-rw-r--r--cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy6
1 files changed, 5 insertions, 1 deletions
diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
index d372d3c0b..edc484b14 100644
--- a/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
+++ b/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
@@ -33,6 +33,7 @@ import org.onap.cps.spi.exceptions.SchemaSetAlreadyDefinedException
import org.onap.cps.spi.exceptions.SchemaSetInUseException
import org.spockframework.spring.SpringBean
import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest
import org.springframework.test.web.servlet.MockMvc
import spock.lang.Shared
@@ -60,6 +61,9 @@ class CpsRestExceptionHandlerSpec extends Specification {
@Autowired
MockMvc mvc
+ @Value('${rest.api.base-path}')
+ def basePath
+
@Shared
def errorMessage = 'some error message'
@Shared
@@ -161,7 +165,7 @@ class CpsRestExceptionHandlerSpec extends Specification {
}
def performTestRequest() {
- return mvc.perform(get('/v1/dataspaces/dataspace-name/anchors')).andReturn().response
+ return mvc.perform(get("$basePath/v1/dataspaces/dataspace-name/anchors")).andReturn().response
}
void assertTestResponse(response, expectedStatus,