diff --git a/goofy-client/apps/goofy-e2e/docker-compose.yml b/goofy-client/apps/goofy-e2e/docker-compose.yml index 0b08da07b0c3e073ff906fd980a4ae37459dd698..d06f258484d30f764bc315bfafecc4adc3a1e15e 100644 --- a/goofy-client/apps/goofy-e2e/docker-compose.yml +++ b/goofy-client/apps/goofy-e2e/docker-compose.yml @@ -58,7 +58,7 @@ services: condition: service_healthy ozg-goofy: - image: docker.ozg-sh.de/goofy:PR-326-1.17.0-SNAPSHOT + image: docker.ozg-sh.de/goofy:PR-326-1.17.0-SNAPSHOT platform: linux/amd64 environment: - GRPC_CLIENT_PLUTO_ADDRESS=static://ozg-pluto:9090 @@ -76,7 +76,7 @@ services: - OZGCLOUD_VORGANG_PROCESSOR_1_FORM_ID=Erstattung_FAIL - OZGCLOUD_VORGANG_PROCESSOR_1_FORM_ENGINE_NAME=AFM - OZGCLOUD_VORGANG_PROCESSOR_NAMES_0=ticketCheck - + ports: - 8080:8080 depends_on: @@ -134,8 +134,8 @@ services: depends_on: - ozg-mongodb - smocker: + ozg-smocker: image: thiht/smocker ports: - - 5080:8080 - - 5081:8081 \ No newline at end of file + - 7080:8080 + - 7081:8081 \ No newline at end of file diff --git a/goofy-client/apps/goofy-e2e/src/fixtures/smocker/mocks.yaml b/goofy-client/apps/goofy-e2e/src/fixtures/smocker/mocks.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bd8e62d867118f01c68f2b65912ec6b7aeb8aba1 --- /dev/null +++ b/goofy-client/apps/goofy-e2e/src/fixtures/smocker/mocks.yaml @@ -0,0 +1,23 @@ +- request: + method: POST + path: /externe-processor-success + response: + status: 200 + headers: + Content-Type: application/json + body: > + { + "action": "CREATE_AKTENNOTIZ", + "body": { + "headline": "Eine neue Notiz", + "severity": "INFO", + "text": "Alles fein" + } + } +- request: + method: POST + path: /externe-processor-failure + response: + status: 500 + headers: + body: "Da ist etwas schiefgelaufen" \ No newline at end of file diff --git a/goofy-client/apps/goofy-e2e/start-e2e-environment.sh b/goofy-client/apps/goofy-e2e/start-e2e-environment.sh index 092840b925f24cb6d11854056d22903aeeaee27b..179aae3d06896c35c1287da0486af6755e04ecb8 100755 --- a/goofy-client/apps/goofy-e2e/start-e2e-environment.sh +++ b/goofy-client/apps/goofy-e2e/start-e2e-environment.sh @@ -40,7 +40,7 @@ then export DOCKER_GATEWAY_HOST=172.17.0.1 fi -docker compose -f ${SCRIPT_DIR}/docker-compose.yml up -d ozg-mongodb ozg-usermanager ozg-elastic --wait +docker compose -f ${SCRIPT_DIR}/docker-compose.yml up -d ozg-mongodb ozg-usermanager ozg-elastic ozg-smocker --wait echo echo "Starting Pluto to init search index." @@ -78,5 +78,14 @@ do done echo +echo +echo "Init smocker" +while [ $(curl -sw '%{http_code}' "http://localhost:7081/version" -o /dev/null) -ne 200 ]; do + echo -n "." + sleep 1 +done + +curl -X POST http://localhost:7081/mocks -H 'Content-Type: application/x-yaml' --data-binary @src/fixtures/smocker/mocks.yaml + echo echo "done." \ No newline at end of file