Skip to content

Commit

Permalink
Gh 318: Fix integration tests (#319)
Browse files Browse the repository at this point in the history
* Add tester version to integration test workflow

* Update tag structure in ITs

* Change ITs to use docker compose
  • Loading branch information
t92549 authored Jun 28, 2023
1 parent 60c3b9d commit 72537c1
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 37 deletions.
31 changes: 5 additions & 26 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,14 @@ jobs:
runs-on: ubuntu-latest
env:
GAFFER_VERSION: develop
steps:
GAFFER_TESTER_VERSION: develop
steps:
- uses: actions/checkout@v3

- name: Build images
run: |
source ./docker/accumulo/.env
docker compose --project-directory ./docker/accumulo/ -f ./docker/accumulo/docker-compose.yaml build
docker compose --project-directory ./docker/gaffer/ -f ./docker/gaffer/docker-compose.yaml build
docker compose --project-directory ./docker/gaffer-integration-tests/ -f ./docker/gaffer-integration-tests/docker-compose.yaml build
- name: Install Helm charts
run: ./cd/install_dependencies.sh

- name: Start KinD
run: |
source ./docker/accumulo/.env
kind create cluster --config ./cd/kind.yaml --image kindest/node:v1.24.4
kind load docker-image gchq/hdfs:$HADOOP_VERSION
kind load docker-image gchq/gaffer:$GAFFER_VERSION-accumulo-$ACCUMULO_VERSION
kind load docker-image gchq/gaffer-rest:$GAFFER_VERSION-accumulo-$ACCUMULO_VERSION
kind load docker-image gchq/gaffer-integration-tests:$GAFFER_VERSION-accumulo-$ACCUMULO_VERSION
- name: Deploy Gaffer
run: |
helm install gaffer ./kubernetes/gaffer --timeout=6m -f ./kubernetes/gaffer/integration-tests.yaml \
--set accumulo.hdfs.config.hdfsSite."dfs\.namenode\.datanode\.registration\.ip-hostname-check"=false
- name: Run Integration Tests
run: helm test gaffer --timeout=40m
run: |
cd docker/gaffer-integration-tests/
docker compose up --exit-code-from gaffer-integration-tests
- name: Send success message to ms teams
if: ${{ success()}}
Expand Down
1 change: 1 addition & 0 deletions docker/accumulo1.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ ACCUMULO_VERSION=1.9.3
HADOOP_CONF_DIR=/etc/hadoop/conf
ACCUMULO_CONF_DIR=/etc/accumulo/conf
GAFFER_VERSION=2.0.0
GAFFER_TESTER_VERSION=2.0.0
GAFFERPY_VERSION=2.0.0
SPARK_VERSION=3.1.2
1 change: 1 addition & 0 deletions docker/accumulo2.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ ACCUMULO_VERSION=2.0.1
HADOOP_CONF_DIR=/etc/hadoop/conf
ACCUMULO_CONF_DIR=/etc/accumulo/conf
GAFFER_VERSION=2.0.0
GAFFER_TESTER_VERSION=2.0.0
GAFFERPY_VERSION=2.0.0
SPARK_VERSION=3.1.2
8 changes: 4 additions & 4 deletions docker/gaffer-federated-integration-tests/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ services:
GAFFER_VERSION: ${GAFFER_VERSION}
BASE_IMAGE_NAME: gchq/accumulo
BASE_IMAGE_TAG: ${ACCUMULO_VERSION}
# Before calling entrypoint, create a delayed background process that
# will correctly setup auths so that tests can run
entrypoint: bash -c '{ sleep 150; ./opt/accumulo/bin/accumulo shell -u root -p secret -e "setauths -u root -s vis1,vis2,publicVisibility,privateVisibility,public,private"; } & /entrypoint.sh accumulo master'
command: master
container_name: accumulo-master
hostname: accumulo-master
environment:
Expand All @@ -117,7 +115,9 @@ services:
interval: 30s
timeout: 5s
retries: 3
command: tserver
# Before calling entrypoint, create a background process that
# will correctly setup auths so that tests can run
entrypoint: bash -c '{ ./opt/accumulo/bin/accumulo shell -u root -p secret -e "setauths -u root -s vis1,vis2,publicVisibility,privateVisibility,public,private"; } & /entrypoint.sh accumulo tserver'
container_name: accumulo-tserver
hostname: accumulo-tserver
environment:
Expand Down
8 changes: 4 additions & 4 deletions docker/gaffer-integration-tests/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ services:
GAFFER_VERSION: ${GAFFER_VERSION}
BASE_IMAGE_NAME: gchq/accumulo
BASE_IMAGE_TAG: ${ACCUMULO_VERSION}
# Before calling entrypoint, create a delayed background process that
# will correctly setup auths so that tests can run
entrypoint: bash -c '{ sleep 150; ./opt/accumulo/bin/accumulo shell -u root -p secret -e "setauths -u root -s vis1,vis2,publicVisibility,privateVisibility,public,private"; } & /entrypoint.sh accumulo master'
command: master
container_name: accumulo-master
hostname: accumulo-master
environment:
Expand All @@ -117,7 +115,9 @@ services:
interval: 30s
timeout: 5s
retries: 3
command: tserver
# Before calling entrypoint, create a background process that
# will correctly setup auths so that tests can run
entrypoint: bash -c '{ ./opt/accumulo/bin/accumulo shell -u root -p secret -e "setauths -u root -s vis1,vis2,publicVisibility,privateVisibility,public,private"; } & /entrypoint.sh accumulo tserver'
container_name: accumulo-tserver
hostname: accumulo-tserver
environment:
Expand Down
4 changes: 2 additions & 2 deletions kubernetes/gaffer/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
api:
user: root
image:
tag: develop
tag: develop-accumulo-2.0.1

test:
runIntegrationTests: true


accumulo:
image:
tag: develop
tag: develop-accumulo-2.0.1
hdfs:
postInstallCommands:
- hadoop fs -mkdir -p /accumulo
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/gaffer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ test:
images:
integration:
repository: gchq/gaffer-integration-tests
tag: develop
tag: develop-accumulo-2.0.1
curl:
repository: curlimages/curl
tag: 7.67.0
Expand Down

0 comments on commit 72537c1

Please sign in to comment.