Skip to content

Commit

Permalink
Setup tests and use of docker bridge ip
Browse files Browse the repository at this point in the history
  • Loading branch information
fantonangeli committed Dec 10, 2024
1 parent 6e5507e commit 891451b
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 48 deletions.
5 changes: 4 additions & 1 deletion packages/sonataflow-management-console-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,21 @@
"image:cekit:setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env sonataflowManagementConsoleImageEnv.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowManagementConsoleImageEnv.account) KOGITO_IMAGE_NAME=$(build-env sonataflowManagementConsoleImageEnv.name) KOGITO_IMAGE_TAG=$(build-env sonataflowManagementConsoleImageEnv.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env versions.quarkus) KOGITO_VERSION=$(build-env versions.kogito) SONATAFLOW_MANAGEMENT_CONSOLE_PORT=$(build-env sonataflowManagementConsoleImageEnv.port)",
"image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p dist-dev/target/test/results\" \"run-script-os\" --finally \"cp -R dist-dev/target/test/results dist-tests-e2e/\"",
"image:test:darwin:win32": "echo \"Tests skipped on macOS and Windows\"",
"image:test:linux": "pnpm copy:test-assets && pnpm image:cekit:setup:env SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT='http://$(hostname -I | awk '{print $1}'):4000/graphql' make -C ./dist-dev test-image"
"image:test:linux": "pnpm copy:test-assets && pnpm start-server-and-test start:sonataflow-dev-app http-get://0.0.0.0:4000/graphql 'pnpm image:cekit:setup:env make -C ./dist-dev test-image'",
"start:sonataflow-dev-app": "SONATAFLOW_DEV_APP_DELAY=0 npm --prefix ./node_modules/@kie-tools/sonataflow-dev-app run start"
},
"devDependencies": {
"@kie-tools/image-env-to-json": "workspace:*",
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-dev-app": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
"@kie-tools/sonataflow-management-console-image-env": "workspace:*",
"@kie-tools/sonataflow-management-console-webapp": "workspace:*",
"cross-env": "^7.0.3",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6",
"start-server-and-test": "^2.0.3",
"ts-json-schema-generator": "^1.1.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
Feature: Serverless Workflow Management Console images

Scenario: verify that the home page is served
When container is started with env
| variable | value |
When container is ready
Then container log should contain httpd -D FOREGROUND
Then check that page is served
| property | value |
Expand All @@ -14,16 +13,15 @@ Feature: Serverless Workflow Management Console images
| expected_status_code | 200 |

Scenario: Verify that the rewrite rule for /graphql is in httpd.conf
When container is started with env
| variable | value |
When container is ready
Then container log should contain httpd -D FOREGROUND
Then file /etc/httpd/conf/httpd.conf should contain /graphql


Scenario: verify that the data-index is available from the container
When container is started with env
| variable | value |
| SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT | http://192.168.138.171:4000/graphql |
| variable | value |
| SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT | http://172.18.0.1:4000/graphql |
Then container log should contain httpd -D FOREGROUND
Then check that page is served
| property | value |
Expand All @@ -32,6 +30,6 @@ Feature: Serverless Workflow Management Console images
| request_method | POST |
| request_body | { "query": "{ProcessInstances{ id } }" } |
| content_type | application/json |
| wait | 15 |
| wait | 480 |
| expected_status_code | 200 |
| expected_phrase | "data":{"ProcessInstances |
Loading

0 comments on commit 891451b

Please sign in to comment.