diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2024-03-26 18:03:36 +0000 |
---|---|---|
committer | danielhanrahan <daniel.hanrahan@est.tech> | 2024-03-28 17:44:48 +0000 |
commit | c454bb912798d90ee0d6cb6fc56c8926dc120bb1 (patch) | |
tree | 4ea3c643e4f99556ee82db2e6cc1470d34be414d /integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpBearerTokenPassthroughSpec.groovy | |
parent | 3cf768abb67e9d53ee0fe8c9b0b8efc3dfdbb60e (diff) |
[BUG] Mock DMI will respond to Health Checks during tests
Health Check for DMI is sometimes running during integration tests,
causing the mockDmiServer to fail due to unexpected Rest requests.
As a fix, the mock DMI will respond to health checks.
Issue-ID: CPS-2167
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ie4a0059583e66dfcc00e1aa998671a662ccf053a
Diffstat (limited to 'integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpBearerTokenPassthroughSpec.groovy')
-rw-r--r-- | integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpBearerTokenPassthroughSpec.groovy | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpBearerTokenPassthroughSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpBearerTokenPassthroughSpec.groovy index 0dabbf30a4..28c4280468 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpBearerTokenPassthroughSpec.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpBearerTokenPassthroughSpec.groovy @@ -40,12 +40,15 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. class NcmpBearerTokenPassthroughSpec extends CpsIntegrationSpecBase { - static final NO_MODULE_SET_TAG = '' static final MODULE_REFERENCES_RESPONSE = readResourceDataFile('mock-dmi-responses/bookStoreAWithModules_M1_M2_Response.json') static final MODULE_RESOURCES_RESPONSE = readResourceDataFile('mock-dmi-responses/bookStoreAWithModules_M1_M2_ResourcesResponse.json') def setup() { - registerCmHandle(DMI_URL, 'ch-1', NO_MODULE_SET_TAG, MODULE_REFERENCES_RESPONSE, MODULE_RESOURCES_RESPONSE) + mockDmiWillRespondToHealthChecks(DMI_URL) + mockDmiResponsesForModuleSync(DMI_URL, 'ch-1', MODULE_REFERENCES_RESPONSE, MODULE_RESOURCES_RESPONSE) + registerCmHandle(DMI_URL, 'ch-1', NO_MODULE_SET_TAG) + mockDmiServer.reset() + mockDmiWillRespondToHealthChecks(DMI_URL) } def cleanup() { |