-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from ba-st/integration_tests_gs64
Add integration tests for GS64
- Loading branch information
Showing
12 changed files
with
110 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Integration Tests GS64 | ||
on: | ||
- push | ||
- pull_request | ||
- workflow_dispatch | ||
jobs: | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
name: Integration Tests GS64 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Configure keyfile | ||
run: | | ||
echo "$GS_KEYFILE" > ./api-tests/gs64/gemstone.key | ||
env: | ||
GS_KEYFILE: ${{ secrets.GS_KEYFILE }} | ||
- name: Run GS64 tests using Docker | ||
run: ./compose-test-gs64.sh | ||
- name: Remove keyfile | ||
if: always() | ||
run: rm -f ./api-tests/gs64/gemstone.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gemstone.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
version: '3' | ||
services: | ||
api: | ||
build: | ||
context: ../../ | ||
dockerfile: docker/gs64/Dockerfile | ||
cap_add: | ||
- CAP_SYS_RESOURCE | ||
ports: | ||
- "8080:8080" | ||
environment: | ||
STARGATE__PUBLIC_URL: http://api:8080 | ||
STARGATE__PORT: 8080 | ||
STARGATE__OPERATIONS_SECRET: API-tests | ||
HEALTH_CHECK_TOKEN: eyJhbGciOiJIUzI1NiJ9.eyJwZXJtaXNzaW9ucyI6WyJleGVjdXRlOmhlYWx0aC1jaGVjayJdfQ.gLammIebJuNDYDz70T8ZYK9GV8jXWrt18mPnLPvoCjw | ||
STARGATE__CONSUL_AGENT_LOCATION: http://consul-agent:8500 | ||
GS64_STONE_HOSTNAME: stone | ||
TZ: America/Argentina/Buenos_Aires | ||
volumes: | ||
- ./gem.conf:/opt/gemstone/conf.gem.conf | ||
depends_on: | ||
- consul-agent | ||
- stone | ||
stone: | ||
init: true | ||
image: ghcr.io/ba-st/gs64-rowan:v3.7.0 | ||
cap_add: | ||
- CAP_SYS_RESOURCE | ||
environment: | ||
TZ: America/Argentina/Buenos_Aires | ||
volumes: | ||
- ./gem.conf:/opt/gemstone/conf/gem.conf | ||
- ./gemstone.key:/opt/gemstone/product/sys/gemstone.key:ro | ||
- $PWD:/opt/gemstone/projects/Stargate-Consul | ||
consul-agent: | ||
image: consul:1.8 | ||
ports: | ||
- "8500:8500" | ||
- "8600:8600" | ||
- "8300:8300" | ||
environment: | ||
CONSUL_BIND_INTERFACE: eth0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEM_TEMPOBJ_CACHE_SIZE = 500000KB; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
echo "Building API" | ||
docker compose -f api-tests/gs64/docker-compose.yml build api | ||
echo "Starting Stone" | ||
docker compose -f api-tests/gs64/docker-compose.yml up -d stone | ||
echo "Starting Consul Agent" | ||
docker compose -f api-tests/gs64/docker-compose.yml up -d consul-agent | ||
sleep 2 | ||
echo "Installing support code" | ||
docker exec -i -u gemstone gs64-stone-1 ./load-rowan-project.sh Stargate-Consul Stargate-Consul-Examples | ||
echo "Starting API" | ||
docker compose -f api-tests/gs64/docker-compose.yml up -d api | ||
sleep 10 | ||
echo "Testing API" | ||
curl --fail http://localhost:8080/echo/hello | ||
curl --fail http://localhost:8500/v1/agent/services | ||
curl --fail http://localhost:8500/v1/health/checks/echo | ||
HEALTH_STATUS=$(curl -s http://localhost:8500/v1/health/checks/echo | jq '.[0].Status') | ||
echo "$HEALTH_STATUS" | ||
if [ "$HEALTH_STATUS" != '"passing"' ]; then | ||
echo "Error: Echo service is unhealthy" >&2 | ||
docker compose -f api-tests/gs64/docker-compose.yml down | ||
exit 1 | ||
fi | ||
docker compose -f api-tests/gs64/docker-compose.yml down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM ghcr.io/ba-st/launchpad-gs64:v5 | ||
CMD [ "launchpad", "start", "stargate-consul-example" ] |
File renamed without changes.