From ee57d90fdab6d911ce7dfacb6fca974c02633700 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Wed, 21 Jun 2023 13:00:01 -0400 Subject: [PATCH 01/43] Add testkube tests --- tests/testkube/curltest.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/testkube/curltest.json diff --git a/tests/testkube/curltest.json b/tests/testkube/curltest.json new file mode 100644 index 0000000..67d26e6 --- /dev/null +++ b/tests/testkube/curltest.json @@ -0,0 +1,9 @@ +{ + "command": [ + "curl", + "https://github.com", + "-H", + "'Accept: application/json'" + ], + "expected_status": "200" +} From 98c1fd12addfd7ba53e194318a690dd55301d1f7 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 10:29:49 -0400 Subject: [PATCH 02/43] Testing failure --- tests/testkube/curltest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testkube/curltest.json b/tests/testkube/curltest.json index 67d26e6..f4a2915 100644 --- a/tests/testkube/curltest.json +++ b/tests/testkube/curltest.json @@ -1,7 +1,7 @@ { "command": [ "curl", - "https://github.com", + "https://localhost/test/pah", "-H", "'Accept: application/json'" ], From 5fc5ac36ae2e808f61559b77cab3655bfd5f67c3 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 11:05:04 -0400 Subject: [PATCH 03/43] Adding root api test --- tests/testkube/curl/swoop-api-root-test.json | 10 ++++++++++ tests/testkube/curltest.json | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 tests/testkube/curl/swoop-api-root-test.json delete mode 100644 tests/testkube/curltest.json diff --git a/tests/testkube/curl/swoop-api-root-test.json b/tests/testkube/curl/swoop-api-root-test.json new file mode 100644 index 0000000..abed8d2 --- /dev/null +++ b/tests/testkube/curl/swoop-api-root-test.json @@ -0,0 +1,10 @@ +{ + "command": [ + "curl", + "http://{{.apiHost}}/", + "-H", + "'Accept: application/json'" + ], + "expected_status": "200", + "expected_body": "{\"title\":\"Example processing server\",\"description\":\"Example server implementing the OGC API - Processes 1.0 Standard\",\"links\":[{\"href\":\"http://{{.apiHost}}/conformance\",\"rel\":\"http://www.opengis.net/def/rel/ogc/1.0/conformance\",\"type\":\"application/json\",\"hreflang\":null,\"title\":null}]}" +} diff --git a/tests/testkube/curltest.json b/tests/testkube/curltest.json deleted file mode 100644 index f4a2915..0000000 --- a/tests/testkube/curltest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "command": [ - "curl", - "https://localhost/test/pah", - "-H", - "'Accept: application/json'" - ], - "expected_status": "200" -} From 915c1ba308434593c8e08e5fbc4d5d0eab374cb2 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 11:51:53 -0400 Subject: [PATCH 04/43] Adding jobs and payload input tests --- tests/testkube/curl/swoop-api-jobs-test.json | 10 ++++++++++ tests/testkube/curl/swoop-api-payload-input-test.json | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/testkube/curl/swoop-api-jobs-test.json create mode 100644 tests/testkube/curl/swoop-api-payload-input-test.json diff --git a/tests/testkube/curl/swoop-api-jobs-test.json b/tests/testkube/curl/swoop-api-jobs-test.json new file mode 100644 index 0000000..5c675e9 --- /dev/null +++ b/tests/testkube/curl/swoop-api-jobs-test.json @@ -0,0 +1,10 @@ +{ + "command": [ + "curl", + "http://{{.apiHost}}/jobs/", + "-H", + "'Accept: application/json'" + ], + "expected_status": "200", + "expected_body": "{\"jobs\":[{\"processID\":\"action_2\",\"type\":\"process\",\"jobID\":\"81842304-0aa9-4609-89f0-1c86819b0752\",\"status\":\"accepted\",\"message\":null,\"created\":null,\"started\":null,\"finished\":null,\"updated\":\"2023-04-28T15:49:00+00:00\",\"progress\":null,\"links\":null,\"parentID\":\"2595f2da-81a6-423c-84db-935e6791046e\"},{\"processID\":\"action_1\",\"type\":\"process\",\"jobID\":\"2595f2da-81a6-423c-84db-935e6791046e\",\"status\":\"successful\",\"message\":null,\"created\":null,\"started\":null,\"finished\":null,\"updated\":\"2023-04-28T15:49:03+00:00\",\"progress\":null,\"links\":null,\"parentID\":\"cf8ff7f0-ce5d-4de6-8026-4e551787385f\"}],\"links\":[{\"href\":\"http://www.example.com\",\"rel\":null,\"type\":null,\"hreflang\":null,\"title\":null}]}" +} diff --git a/tests/testkube/curl/swoop-api-payload-input-test.json b/tests/testkube/curl/swoop-api-payload-input-test.json new file mode 100644 index 0000000..fd39518 --- /dev/null +++ b/tests/testkube/curl/swoop-api-payload-input-test.json @@ -0,0 +1,10 @@ +{ + "command": [ + "curl", + "http://{{.apiHost}}/jobs/2595f2da-81a6-423c-84db-935e6791046e/payload", + "-H", + "'Accept: application/json'" + ], + "expected_status": "200", + "expected_body": "{\"process_id\":\"2595f2da-81a6-423c-84db-935e6791046e\",\"payload\":\"test_input\"}" +} From ac81a5a2fd548feafa0ab6db500301ff88199c3e Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 12:28:13 -0400 Subject: [PATCH 05/43] Adding a simple load test example --- .../artillery/swoop-api-simple-load-test.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/testkube/artillery/swoop-api-simple-load-test.yaml diff --git a/tests/testkube/artillery/swoop-api-simple-load-test.yaml b/tests/testkube/artillery/swoop-api-simple-load-test.yaml new file mode 100644 index 0000000..ca37885 --- /dev/null +++ b/tests/testkube/artillery/swoop-api-simple-load-test.yaml @@ -0,0 +1,28 @@ +config: + target: "http://{{.apiHost}}" + phases: + - duration: 5 + arrivalRate: 1 + rampTo: 5 + name: Min load test of 5 users + - duration: 5 + arrivalRate: 1 + rampTo: 10 + name: Medium load test of 10 users + - duration: 5 + arrivalRate: 1 + rampTo: 15 + name: Max load test of 15 users +scenarios: + - name: "Check SWOOP API root" + flow: + - get: + url: "/" + - name: "Check SWOOP API jobs endpoint (with swoop-db)" + flow: + - get: + url: "/jobs/" + - name: "Check SWOOP API payload input (with object storage)" + flow: + - get: + url: "/jobs/2595f2da-81a6-423c-84db-935e6791046e/payload" From f6f48493dd612229e28ace429f586e5dd642d768 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 12:46:37 -0400 Subject: [PATCH 06/43] Adding k6 load test --- .../artillery/swoop-api-simple-load-test.yaml | 28 ------------------- .../k6/swoop-api-simple-k6-load-test.js | 26 +++++++++++++++++ 2 files changed, 26 insertions(+), 28 deletions(-) delete mode 100644 tests/testkube/artillery/swoop-api-simple-load-test.yaml create mode 100644 tests/testkube/k6/swoop-api-simple-k6-load-test.js diff --git a/tests/testkube/artillery/swoop-api-simple-load-test.yaml b/tests/testkube/artillery/swoop-api-simple-load-test.yaml deleted file mode 100644 index ca37885..0000000 --- a/tests/testkube/artillery/swoop-api-simple-load-test.yaml +++ /dev/null @@ -1,28 +0,0 @@ -config: - target: "http://{{.apiHost}}" - phases: - - duration: 5 - arrivalRate: 1 - rampTo: 5 - name: Min load test of 5 users - - duration: 5 - arrivalRate: 1 - rampTo: 10 - name: Medium load test of 10 users - - duration: 5 - arrivalRate: 1 - rampTo: 15 - name: Max load test of 15 users -scenarios: - - name: "Check SWOOP API root" - flow: - - get: - url: "/" - - name: "Check SWOOP API jobs endpoint (with swoop-db)" - flow: - - get: - url: "/jobs/" - - name: "Check SWOOP API payload input (with object storage)" - flow: - - get: - url: "/jobs/2595f2da-81a6-423c-84db-935e6791046e/payload" diff --git a/tests/testkube/k6/swoop-api-simple-k6-load-test.js b/tests/testkube/k6/swoop-api-simple-k6-load-test.js new file mode 100644 index 0000000..7980908 --- /dev/null +++ b/tests/testkube/k6/swoop-api-simple-k6-load-test.js @@ -0,0 +1,26 @@ +import http from 'k6/http'; +import {check,sleep} from 'k6'; + +export const options = { + stages: [ + { + duration: '5s', + target: 10 + }, + ], +}; + +export default function() { + const swoopApiRoot = http.get('http://{{.apiHost}}/'); + check(swoopApiRoot, { + 'status of SWOOP API root test was 200': (r) => r.status == 200 + }); + const swoopApiJobs = http.get('http://{{.apiHost}}/jobs/'); + check(swoopApiJobs, { + 'status of SWOOP API jobs endpoint (with swoop-db) test was 200': (r) => r.status == 200 + }); + const swoopApiJobPayload = http.get('http://{{.apiHost}}/jobs/2595f2da-81a6-423c-84db-935e6791046e/payload'); + check(swoopApiJobPayload, { + 'status of SWOOP API payload input (with object storage) test was 200': (r) => r.status == 200 + }); +} From 24f16e174e2912f5821a336a9acc825cdd8528b3 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 12:54:17 -0400 Subject: [PATCH 07/43] Fixing environment variable reference --- tests/testkube/k6/swoop-api-simple-k6-load-test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testkube/k6/swoop-api-simple-k6-load-test.js b/tests/testkube/k6/swoop-api-simple-k6-load-test.js index 7980908..b2d70a1 100644 --- a/tests/testkube/k6/swoop-api-simple-k6-load-test.js +++ b/tests/testkube/k6/swoop-api-simple-k6-load-test.js @@ -11,15 +11,15 @@ export const options = { }; export default function() { - const swoopApiRoot = http.get('http://{{.apiHost}}/'); + const swoopApiRoot = http.get('http://' + __ENV.API_HOST + '/'); check(swoopApiRoot, { 'status of SWOOP API root test was 200': (r) => r.status == 200 }); - const swoopApiJobs = http.get('http://{{.apiHost}}/jobs/'); + const swoopApiJobs = http.get('http://' + __ENV.API_HOST + '/jobs/'); check(swoopApiJobs, { 'status of SWOOP API jobs endpoint (with swoop-db) test was 200': (r) => r.status == 200 }); - const swoopApiJobPayload = http.get('http://{{.apiHost}}/jobs/2595f2da-81a6-423c-84db-935e6791046e/payload'); + const swoopApiJobPayload = http.get('http://' + __ENV.API_HOST + '/jobs/2595f2da-81a6-423c-84db-935e6791046e/payload'); check(swoopApiJobPayload, { 'status of SWOOP API payload input (with object storage) test was 200': (r) => r.status == 200 }); From 4c8d1d970f56d63447fef1cd48ebc3ce248704e1 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 13:52:44 -0400 Subject: [PATCH 08/43] Adding testkube tests --- .github/workflows/testkube.yml | 104 +++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 .github/workflows/testkube.yml diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml new file mode 100644 index 0000000..e95c985 --- /dev/null +++ b/.github/workflows/testkube.yml @@ -0,0 +1,104 @@ +# This workflow sets up Testkube Kubernetes Tests + +name: Testkube Kubernetes Tests + +on: + push: + branches: ["main" ] + pull_request: + branches: ["main"] + +permissions: + contents: read + +jobs: + testkube: + permissions: + contents: read + security-events: write + actions: read + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: Create k3d Cluster + uses: nolar/setup-k3d-k3s@v1 + with: + k3d-args: --no-lb + + - name: Configuring kube context and getting cluster info + run: | + export KUBECONFIG=${HOME}/.kube/config + kubectl cluster-info + kubectl get pods -n kube-system + kubectl get nodes + echo "kubeconfig-file-location:" $KUBECONFIG + echo "current-context:" $(kubectl config current-context) + export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) + echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars + echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install '.[dev]' + + - name: Load .env file into environment + uses: cardinalby/export-env-action@v2 + with: + envFile: '.env' + expand: true + + - name: Create SWOOP Container + run: docker compose up --build -V -d + + - name: Setup MinIO + run: | + curl https://dl.min.io/client/mc/release/linux-amd64/mc \ + --create-dirs \ + -o $HOME/minio-binaries/mc + chmod +x $HOME/minio-binaries/mc + export PATH=$PATH:$HOME/minio-binaries/ + export MINIO_ACCESS_KEY=$SWOOP_ACCESS_KEY_ID + export MINIO_SECRET_KEY=$SWOOP_SECRET_ACCESS_KEY + mc alias set swoopminio http://127.0.0.1:9000 $MINIO_ACCESS_KEY $MINIO_SECRET_KEY + mc cp --recursive swoop/tests/fixtures/io/base_01/ swoopminio/swoop/execution/2595f2da-81a6-423c-84db-935e6791046e/ + + - name: Setup Postgres + run: | + sudo apt update + sudo apt install postgresql postgresql-contrib + export PGHOST="127.0.0.1" + export PGUSER="`helm get values postgres -n db -a -o json | jq -r .postgres.service.dbUser | base64 --decode`" + export PGPASSWORD="`helm get values postgres -n db -a -o json | jq -r .postgres.service.dbPassword | base64 --decode`" + export PGPORT="`helm get values postgres -n db -a -o json | jq -r .postgres.service.port`" + export PGDATABASE="`helm get values postgres -n db -a -o json | jq -r .postgres.service.dbName`" + export PGAUTHMETHOD="trust" + psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/migrations/00000_base_schema.up.sql + psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/fixtures/base_01.sql + + - name: Installing Testkube + run: | + wget -qO - https://repo.testkube.io/key.pub | sudo apt-key add - + echo "deb https://repo.testkube.io/linux linux main" | sudo tee -a /etc/apt/sources.list + sudo apt-get update + sudo apt-get install -y testkube + kubectl testkube install --no-confirm + kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube + kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & + testkube config api-uri http://127.0.0.1:8088/v1 + + - name: Create Testkube Tests + run: | + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=127.0.0.1:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=127.0.0.1:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=127.0.0.1:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=127.0.0.1:8000 + + - name: Running Testkube Tests + run: | + testkube run test --watch swoop-api-root-test + testkube run test --watch swoop-api-jobs-test + testkube run test --watch swoop-api-payload-input-test + testkube run test --watch swoop-api-simple-k6-load-test From a37b34623556fe076b08939ae1e9ca8445a0f6b8 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 14:02:43 -0400 Subject: [PATCH 09/43] fixing env variables --- .github/workflows/testkube.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index e95c985..955a908 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -60,21 +60,13 @@ jobs: -o $HOME/minio-binaries/mc chmod +x $HOME/minio-binaries/mc export PATH=$PATH:$HOME/minio-binaries/ - export MINIO_ACCESS_KEY=$SWOOP_ACCESS_KEY_ID - export MINIO_SECRET_KEY=$SWOOP_SECRET_ACCESS_KEY - mc alias set swoopminio http://127.0.0.1:9000 $MINIO_ACCESS_KEY $MINIO_SECRET_KEY + mc alias set swoopminio http://127.0.0.1:9000 $SWOOP_ACCESS_KEY_ID $SWOOP_SECRET_ACCESS_KEY mc cp --recursive swoop/tests/fixtures/io/base_01/ swoopminio/swoop/execution/2595f2da-81a6-423c-84db-935e6791046e/ - name: Setup Postgres run: | sudo apt update sudo apt install postgresql postgresql-contrib - export PGHOST="127.0.0.1" - export PGUSER="`helm get values postgres -n db -a -o json | jq -r .postgres.service.dbUser | base64 --decode`" - export PGPASSWORD="`helm get values postgres -n db -a -o json | jq -r .postgres.service.dbPassword | base64 --decode`" - export PGPORT="`helm get values postgres -n db -a -o json | jq -r .postgres.service.port`" - export PGDATABASE="`helm get values postgres -n db -a -o json | jq -r .postgres.service.dbName`" - export PGAUTHMETHOD="trust" psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/migrations/00000_base_schema.up.sql psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/fixtures/base_01.sql From ec1133efff848ec2044335aa9720a387e7e50ea3 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 14:16:37 -0400 Subject: [PATCH 10/43] fixing env variables --- .github/workflows/testkube.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 955a908..d1e37ba 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -21,23 +21,6 @@ jobs: steps: - uses: actions/checkout@master - - name: Create k3d Cluster - uses: nolar/setup-k3d-k3s@v1 - with: - k3d-args: --no-lb - - - name: Configuring kube context and getting cluster info - run: | - export KUBECONFIG=${HOME}/.kube/config - kubectl cluster-info - kubectl get pods -n kube-system - kubectl get nodes - echo "kubeconfig-file-location:" $KUBECONFIG - echo "current-context:" $(kubectl config current-context) - export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) - echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars - echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars - - name: Install dependencies run: | python -m pip install --upgrade pip @@ -70,6 +53,23 @@ jobs: psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/migrations/00000_base_schema.up.sql psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/fixtures/base_01.sql + - name: Create k3d Cluster + uses: nolar/setup-k3d-k3s@v1 + with: + k3d-args: --no-lb + + - name: Configuring kube context and getting cluster info + run: | + export KUBECONFIG=${HOME}/.kube/config + kubectl cluster-info + kubectl get pods -n kube-system + kubectl get nodes + echo "kubeconfig-file-location:" $KUBECONFIG + echo "current-context:" $(kubectl config current-context) + export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) + echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars + echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars + - name: Installing Testkube run: | wget -qO - https://repo.testkube.io/key.pub | sudo apt-key add - From f7da8fa4228ef1dcdb0e250e5002655f05764802 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 14:19:04 -0400 Subject: [PATCH 11/43] fixing env variables --- .github/workflows/testkube.yml | 39 +++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index d1e37ba..c1effc0 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -21,6 +21,28 @@ jobs: steps: - uses: actions/checkout@master + - name: Create k3d Cluster + uses: nolar/setup-k3d-k3s@v1 + with: + k3d-args: --no-lb + + - name: Configuring kube context and getting cluster info + run: | + export KUBECONFIG=${HOME}/.kube/config + kubectl cluster-info + kubectl get pods -n kube-system + kubectl get nodes + echo "kubeconfig-file-location:" $KUBECONFIG + echo "current-context:" $(kubectl config current-context) + export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) + echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars + echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -53,23 +75,6 @@ jobs: psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/migrations/00000_base_schema.up.sql psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/fixtures/base_01.sql - - name: Create k3d Cluster - uses: nolar/setup-k3d-k3s@v1 - with: - k3d-args: --no-lb - - - name: Configuring kube context and getting cluster info - run: | - export KUBECONFIG=${HOME}/.kube/config - kubectl cluster-info - kubectl get pods -n kube-system - kubectl get nodes - echo "kubeconfig-file-location:" $KUBECONFIG - echo "current-context:" $(kubectl config current-context) - export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) - echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars - echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars - - name: Installing Testkube run: | wget -qO - https://repo.testkube.io/key.pub | sudo apt-key add - From 4efc2d6982a2327229f973ce4e135ad0f5f214d8 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 14:20:39 -0400 Subject: [PATCH 12/43] fixing env variables --- .github/workflows/testkube.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index c1effc0..f07ef77 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -17,6 +17,10 @@ jobs: contents: read security-events: write actions: read + strategy: + matrix: + python-version: + - "3.11" runs-on: ubuntu-latest steps: - uses: actions/checkout@master From 0fb3c32297049222a9a94ed7ff98e6bdb04855cf Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 14:23:44 -0400 Subject: [PATCH 13/43] Fix minio and swoop tests --- .github/workflows/testkube.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index f07ef77..9f50c0a 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -70,7 +70,13 @@ jobs: chmod +x $HOME/minio-binaries/mc export PATH=$PATH:$HOME/minio-binaries/ mc alias set swoopminio http://127.0.0.1:9000 $SWOOP_ACCESS_KEY_ID $SWOOP_SECRET_ACCESS_KEY - mc cp --recursive swoop/tests/fixtures/io/base_01/ swoopminio/swoop/execution/2595f2da-81a6-423c-84db-935e6791046e/ + mc cp --recursive tests/fixtures/io/base_01/ swoopminio/swoop/execution/2595f2da-81a6-423c-84db-935e6791046e/ + + - name: Checkout swoop-db repo + uses: actions/checkout@master + with: + repository: Element84/swoop-db + path: swoop-db - name: Setup Postgres run: | From 32bc7883ca8ca0ea1bd01eab5cc0d764ae4e859a Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 14:35:45 -0400 Subject: [PATCH 14/43] Adding github runner ip --- .github/workflows/testkube.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 9f50c0a..c248203 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -96,12 +96,16 @@ jobs: kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & testkube config api-uri http://127.0.0.1:8088/v1 + - name: Get GitHub Action Runner ip addresses + id: ip + uses: haythem/public-ip@v1.2 + - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=127.0.0.1:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=127.0.0.1:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=127.0.0.1:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=127.0.0.1:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=${{ steps.ip.outputs.ipv4 }}:8000 - name: Running Testkube Tests run: | From 340374896f1d06d235c3d2157c11019c847a8297 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 14:43:38 -0400 Subject: [PATCH 15/43] Finding Docker host ip --- .github/workflows/testkube.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index c248203..41c5887 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -96,6 +96,12 @@ jobs: kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & testkube config api-uri http://127.0.0.1:8088/v1 + - name: Find Docker Host IP + uses: addnab/docker-run-action@v1 + with: + image: alpine:latest + run: apk update > /dev/null && apk add iproute2 > /dev/null && ip -4 route show default | cut -d' ' -f3 + - name: Get GitHub Action Runner ip addresses id: ip uses: haythem/public-ip@v1.2 From 3a996212655ee045e433134b2acf31532021ff2d Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 14:51:00 -0400 Subject: [PATCH 16/43] Using a local IP --- .github/workflows/testkube.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 41c5887..152e0f6 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -96,22 +96,12 @@ jobs: kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & testkube config api-uri http://127.0.0.1:8088/v1 - - name: Find Docker Host IP - uses: addnab/docker-run-action@v1 - with: - image: alpine:latest - run: apk update > /dev/null && apk add iproute2 > /dev/null && ip -4 route show default | cut -d' ' -f3 - - - name: Get GitHub Action Runner ip addresses - id: ip - uses: haythem/public-ip@v1.2 - - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=${{ steps.ip.outputs.ipv4 }}:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=172.17.0.1:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=172.17.0.1:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=172.17.0.1:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=172.17.0.1:8000 - name: Running Testkube Tests run: | From be0ce3e898838a7e7578d988967f17289feac317 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 15:49:31 -0400 Subject: [PATCH 17/43] Running testkube tests --- .github/workflows/testkube.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 152e0f6..b1fb52e 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -98,10 +98,10 @@ jobs: - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=172.17.0.1:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=172.17.0.1:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=172.17.0.1:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=172.17.0.1:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.docker.internal:8000 - name: Running Testkube Tests run: | From b21253c58ac48b91af45dcaff290d6a88d78edd5 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:03:15 -0400 Subject: [PATCH 18/43] Running testkube tests --- .github/workflows/testkube.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index b1fb52e..ec295ec 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -32,6 +32,7 @@ jobs: - name: Configuring kube context and getting cluster info run: | + cat /etc/hosts export KUBECONFIG=${HOME}/.kube/config kubectl cluster-info kubectl get pods -n kube-system From 39f117f6aeb003c9f3e1dfd539c55bb4ecb088af Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:08:05 -0400 Subject: [PATCH 19/43] Running testkube tests --- .github/workflows/testkube.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index ec295ec..c4fa7de 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -32,6 +32,8 @@ jobs: - name: Configuring kube context and getting cluster info run: | + echo "127.0.0.1 kubernetes.docker.internal" >> /etc/hosts + echo "127.0.0.1 host.docker.internal" >> /etc/hosts cat /etc/hosts export KUBECONFIG=${HOME}/.kube/config kubectl cluster-info From 85acccc9008bc1453e26914367e54df63a8069d1 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:08:23 -0400 Subject: [PATCH 20/43] Running testkube tests --- .github/workflows/testkube.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index c4fa7de..5809766 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -35,6 +35,7 @@ jobs: echo "127.0.0.1 kubernetes.docker.internal" >> /etc/hosts echo "127.0.0.1 host.docker.internal" >> /etc/hosts cat /etc/hosts + ifconfig export KUBECONFIG=${HOME}/.kube/config kubectl cluster-info kubectl get pods -n kube-system From 8bf91e91951517e563e70cf1882f58743b5121ec Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:09:43 -0400 Subject: [PATCH 21/43] Running testkube tests --- .github/workflows/testkube.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 5809766..01ae3a5 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -32,8 +32,8 @@ jobs: - name: Configuring kube context and getting cluster info run: | - echo "127.0.0.1 kubernetes.docker.internal" >> /etc/hosts - echo "127.0.0.1 host.docker.internal" >> /etc/hosts + sudo echo "127.0.0.1 kubernetes.docker.internal" >> /etc/hosts + sudo echo "127.0.0.1 host.docker.internal" >> /etc/hosts cat /etc/hosts ifconfig export KUBECONFIG=${HOME}/.kube/config From 9f54756bab1d346f6f9f586cc8e6e493fa509ab8 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:11:33 -0400 Subject: [PATCH 22/43] Running testkube tests --- .github/workflows/testkube.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 01ae3a5..7ae78fc 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -32,8 +32,8 @@ jobs: - name: Configuring kube context and getting cluster info run: | - sudo echo "127.0.0.1 kubernetes.docker.internal" >> /etc/hosts - sudo echo "127.0.0.1 host.docker.internal" >> /etc/hosts + sudo echo "127.0.0.1 kubernetes.docker.internal" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts cat /etc/hosts ifconfig export KUBECONFIG=${HOME}/.kube/config From cbe2bde2be3a243e93f28d1f26d03bf50cc4c126 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:16:48 -0400 Subject: [PATCH 23/43] Using local eth0 ip --- .github/workflows/testkube.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 7ae78fc..32dd8fa 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -36,6 +36,8 @@ jobs: sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts cat /etc/hosts ifconfig + export LOCALIP=ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' + echo "LOCALIP=$LOCALIP" export KUBECONFIG=${HOME}/.kube/config kubectl cluster-info kubectl get pods -n kube-system @@ -102,10 +104,10 @@ jobs: - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=host.docker.internal:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=host.docker.internal:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=host.docker.internal:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=$LOCALIP:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=$LOCALIP:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=$LOCALIP:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=$LOCALIP:8000 - name: Running Testkube Tests run: | From 664cfb36e82f1ec0b19f29e8b2ace224267c5215 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:23:50 -0400 Subject: [PATCH 24/43] Using local eth0 ip --- .github/workflows/testkube.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 32dd8fa..e09f576 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -32,8 +32,6 @@ jobs: - name: Configuring kube context and getting cluster info run: | - sudo echo "127.0.0.1 kubernetes.docker.internal" | sudo tee -a /etc/hosts - sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts cat /etc/hosts ifconfig export LOCALIP=ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' @@ -104,10 +102,10 @@ jobs: - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=$LOCALIP:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=$LOCALIP:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=$LOCALIP:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=$LOCALIP:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=172.18.0.1:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=172.18.0.1:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=172.18.0.1:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=172.18.0.1:8000 - name: Running Testkube Tests run: | From d8b73e8e818ad75563f21fbf26d01920db411d65 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:32:24 -0400 Subject: [PATCH 25/43] Using local eth0 ip --- .github/workflows/testkube.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index e09f576..5672afd 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -45,6 +45,8 @@ jobs: export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars + kubectl get service --all-namespaces + sudo iptables -A INPUT -i docker0 -j ACCEPT - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -102,10 +104,10 @@ jobs: - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=172.18.0.1:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=172.18.0.1:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=172.18.0.1:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=172.18.0.1:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=172.17.0.1:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=172.17.0.1:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=172.17.0.1:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=172.17.0.1:8000 - name: Running Testkube Tests run: | From 228d1a18e96d50538af3ed41cce18e7e3970a8f9 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:41:46 -0400 Subject: [PATCH 26/43] Using local eth0 ip --- .github/workflows/testkube.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 5672afd..03578a0 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -32,6 +32,8 @@ jobs: - name: Configuring kube context and getting cluster info run: | + sudo echo "127.0.0.1 kubernetes.docker.internal" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts cat /etc/hosts ifconfig export LOCALIP=ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' @@ -45,7 +47,6 @@ jobs: export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars - kubectl get service --all-namespaces sudo iptables -A INPUT -i docker0 -j ACCEPT - name: Set up Python ${{ matrix.python-version }} @@ -104,10 +105,10 @@ jobs: - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=172.17.0.1:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=172.17.0.1:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=172.17.0.1:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=172.17.0.1:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.docker.internal:8000 - name: Running Testkube Tests run: | From 5cfb15b482fd9058be2a34c94c0597881e63f149 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:50:42 -0400 Subject: [PATCH 27/43] Using local eth0 ip --- .github/workflows/testkube.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 03578a0..14bcc3f 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -47,7 +47,7 @@ jobs: export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars - sudo iptables -A INPUT -i docker0 -j ACCEPT + sudo iptables -I INPUT -p tcp --dport 8000 -j ACCEPT - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -103,12 +103,20 @@ jobs: kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & testkube config api-uri http://127.0.0.1:8088/v1 + - name: get runner ip addresses + id: ip + uses: haythem/public-ip@v1.2 + + - name: Test curl + run: | + curl http://${{ steps.ip.outputs.ipv4 }}:8000/ + - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=host.docker.internal:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=host.docker.internal:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=host.docker.internal:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=${{ steps.ip.outputs.ipv4 }}:8000 - name: Running Testkube Tests run: | From 73afe588bb158f47a8b2499af2bd82711a14a63d Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 16:57:47 -0400 Subject: [PATCH 28/43] Using local eth0 ip --- .github/workflows/testkube.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 14bcc3f..3838d36 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -48,6 +48,7 @@ jobs: echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars sudo iptables -I INPUT -p tcp --dport 8000 -j ACCEPT + sudo ufw allow 8000 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 From 0c6c0e582cbe91be3cfe7576ce2f071ccd218c9d Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 19:23:29 -0400 Subject: [PATCH 29/43] Adding docker internal --- .github/workflows/testkube.yml | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 3838d36..242a457 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -27,28 +27,19 @@ jobs: - name: Create k3d Cluster uses: nolar/setup-k3d-k3s@v1 - with: - k3d-args: --no-lb - name: Configuring kube context and getting cluster info run: | - sudo echo "127.0.0.1 kubernetes.docker.internal" | sudo tee -a /etc/hosts - sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts - cat /etc/hosts - ifconfig - export LOCALIP=ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' - echo "LOCALIP=$LOCALIP" export KUBECONFIG=${HOME}/.kube/config kubectl cluster-info kubectl get pods -n kube-system kubectl get nodes + kubectl get svc -A echo "kubeconfig-file-location:" $KUBECONFIG echo "current-context:" $(kubectl config current-context) export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars - sudo iptables -I INPUT -p tcp --dport 8000 -j ACCEPT - sudo ufw allow 8000 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -104,20 +95,12 @@ jobs: kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & testkube config api-uri http://127.0.0.1:8088/v1 - - name: get runner ip addresses - id: ip - uses: haythem/public-ip@v1.2 - - - name: Test curl - run: | - curl http://${{ steps.ip.outputs.ipv4 }}:8000/ - - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=${{ steps.ip.outputs.ipv4 }}:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=${{ steps.ip.outputs.ipv4 }}:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.docker.internal:8000 - name: Running Testkube Tests run: | From f71abc006c32dccabb9fcee20389359e0fbe7beb Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 19:25:39 -0400 Subject: [PATCH 30/43] Adding host.k3d.internal --- .github/workflows/testkube.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 242a457..6b41d0a 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -97,10 +97,10 @@ jobs: - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=host.docker.internal:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=host.docker.internal:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=host.docker.internal:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.docker.internal:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.k3d.internal:8000 - name: Running Testkube Tests run: | From cb3365ee28b4c4533ed70dfa0fb0d86b1330ea2b Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 22:22:46 -0400 Subject: [PATCH 31/43] Adding host.k3d.internal --- .github/workflows/testkube.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 6b41d0a..9ff2ac7 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -38,8 +38,7 @@ jobs: echo "kubeconfig-file-location:" $KUBECONFIG echo "current-context:" $(kubectl config current-context) export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) - echo "kubernetes_config_file=\"$KUBECONFIG\"" >> min.tfvars - echo "kubernetes_config_context=\"$KUBE_CONFIG_CONTEXT\"" >> min.tfvars + sudo ufw allow 8000 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 From 06fccbaa1b9ffc4a0ebd970672c2c1d1d1658c28 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 23:04:51 -0400 Subject: [PATCH 32/43] kubernetes tests --- .github/workflows/testkube.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 9ff2ac7..9179368 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -30,6 +30,8 @@ jobs: - name: Configuring kube context and getting cluster info run: | + cat /etc/hosts + echo '127.0.0.1 kubernetes.docker.internal' | sudo tee -a /etc/hosts export KUBECONFIG=${HOME}/.kube/config kubectl cluster-info kubectl get pods -n kube-system @@ -93,6 +95,10 @@ jobs: kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & testkube config api-uri http://127.0.0.1:8088/v1 + kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "nslookup host.docker.internal" + kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "nslookup host.k3d.internal" + kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "nslookup kubernetes.docker.internal" + kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "cat /etc/hosts" - name: Create Testkube Tests run: | From 8798d4d883d504d582bb3cac425321f2c36d6b28 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 23:11:27 -0400 Subject: [PATCH 33/43] kubernetes tests --- .github/workflows/testkube.yml | 88 +++++++++++++++++----------------- 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 9179368..3b89766 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -42,48 +42,48 @@ jobs: export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) sudo ufw allow 8000 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install '.[dev]' - - - name: Load .env file into environment - uses: cardinalby/export-env-action@v2 - with: - envFile: '.env' - expand: true - - - name: Create SWOOP Container - run: docker compose up --build -V -d - - - name: Setup MinIO - run: | - curl https://dl.min.io/client/mc/release/linux-amd64/mc \ - --create-dirs \ - -o $HOME/minio-binaries/mc - chmod +x $HOME/minio-binaries/mc - export PATH=$PATH:$HOME/minio-binaries/ - mc alias set swoopminio http://127.0.0.1:9000 $SWOOP_ACCESS_KEY_ID $SWOOP_SECRET_ACCESS_KEY - mc cp --recursive tests/fixtures/io/base_01/ swoopminio/swoop/execution/2595f2da-81a6-423c-84db-935e6791046e/ - - - name: Checkout swoop-db repo - uses: actions/checkout@master - with: - repository: Element84/swoop-db - path: swoop-db - - - name: Setup Postgres - run: | - sudo apt update - sudo apt install postgresql postgresql-contrib - psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/migrations/00000_base_schema.up.sql - psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/fixtures/base_01.sql + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python-version }} + + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install -r requirements.txt + # pip install '.[dev]' + + # - name: Load .env file into environment + # uses: cardinalby/export-env-action@v2 + # with: + # envFile: '.env' + # expand: true + + # - name: Create SWOOP Container + # run: docker compose up --build -V -d + + # - name: Setup MinIO + # run: | + # curl https://dl.min.io/client/mc/release/linux-amd64/mc \ + # --create-dirs \ + # -o $HOME/minio-binaries/mc + # chmod +x $HOME/minio-binaries/mc + # export PATH=$PATH:$HOME/minio-binaries/ + # mc alias set swoopminio http://127.0.0.1:9000 $SWOOP_ACCESS_KEY_ID $SWOOP_SECRET_ACCESS_KEY + # mc cp --recursive tests/fixtures/io/base_01/ swoopminio/swoop/execution/2595f2da-81a6-423c-84db-935e6791046e/ + + # - name: Checkout swoop-db repo + # uses: actions/checkout@master + # with: + # repository: Element84/swoop-db + # path: swoop-db + + # - name: Setup Postgres + # run: | + # sudo apt update + # sudo apt install postgresql postgresql-contrib + # psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/migrations/00000_base_schema.up.sql + # psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/fixtures/base_01.sql - name: Installing Testkube run: | @@ -95,10 +95,8 @@ jobs: kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & testkube config api-uri http://127.0.0.1:8088/v1 - kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "nslookup host.docker.internal" - kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "nslookup host.k3d.internal" - kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "nslookup kubernetes.docker.internal" kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "cat /etc/hosts" + kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "nslookup host.k3d.internal" - name: Create Testkube Tests run: | From 54e580761920ae18750f0d20575fb74b78cd68db Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 23:18:20 -0400 Subject: [PATCH 34/43] kubernetes tests --- .github/workflows/testkube.yml | 86 +++++++++++++++++----------------- 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 3b89766..4714057 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -42,48 +42,48 @@ jobs: export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) sudo ufw allow 8000 - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ matrix.python-version }} - - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # pip install -r requirements.txt - # pip install '.[dev]' - - # - name: Load .env file into environment - # uses: cardinalby/export-env-action@v2 - # with: - # envFile: '.env' - # expand: true - - # - name: Create SWOOP Container - # run: docker compose up --build -V -d - - # - name: Setup MinIO - # run: | - # curl https://dl.min.io/client/mc/release/linux-amd64/mc \ - # --create-dirs \ - # -o $HOME/minio-binaries/mc - # chmod +x $HOME/minio-binaries/mc - # export PATH=$PATH:$HOME/minio-binaries/ - # mc alias set swoopminio http://127.0.0.1:9000 $SWOOP_ACCESS_KEY_ID $SWOOP_SECRET_ACCESS_KEY - # mc cp --recursive tests/fixtures/io/base_01/ swoopminio/swoop/execution/2595f2da-81a6-423c-84db-935e6791046e/ - - # - name: Checkout swoop-db repo - # uses: actions/checkout@master - # with: - # repository: Element84/swoop-db - # path: swoop-db - - # - name: Setup Postgres - # run: | - # sudo apt update - # sudo apt install postgresql postgresql-contrib - # psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/migrations/00000_base_schema.up.sql - # psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/fixtures/base_01.sql + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install '.[dev]' + + - name: Load .env file into environment + uses: cardinalby/export-env-action@v2 + with: + envFile: '.env' + expand: true + + - name: Create SWOOP Container + run: docker compose up --build -V -d + + - name: Setup MinIO + run: | + curl https://dl.min.io/client/mc/release/linux-amd64/mc \ + --create-dirs \ + -o $HOME/minio-binaries/mc + chmod +x $HOME/minio-binaries/mc + export PATH=$PATH:$HOME/minio-binaries/ + mc alias set swoopminio http://127.0.0.1:9000 $SWOOP_ACCESS_KEY_ID $SWOOP_SECRET_ACCESS_KEY + mc cp --recursive tests/fixtures/io/base_01/ swoopminio/swoop/execution/2595f2da-81a6-423c-84db-935e6791046e/ + + - name: Checkout swoop-db repo + uses: actions/checkout@master + with: + repository: Element84/swoop-db + path: swoop-db + + - name: Setup Postgres + run: | + sudo apt update + sudo apt install postgresql postgresql-contrib + psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/migrations/00000_base_schema.up.sql + psql -p $PGPORT -U $PGUSER $PGDATABASE < swoop-db/src/swoop/db/fixtures/base_01.sql - name: Installing Testkube run: | @@ -95,8 +95,10 @@ jobs: kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & testkube config api-uri http://127.0.0.1:8088/v1 + curl http://127.0.0.1:8000/ kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "cat /etc/hosts" kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "nslookup host.k3d.internal" + kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "wget http://host.k3d.internal:8000/" - name: Create Testkube Tests run: | From ff52934404d448d87a2e0f091660066fe58fe29f Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 23:24:22 -0400 Subject: [PATCH 35/43] kubernetes tests --- .github/workflows/testkube.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 4714057..bc9fa88 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -41,6 +41,8 @@ jobs: echo "current-context:" $(kubectl config current-context) export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) sudo ufw allow 8000 + sudo ufw allow in to 172.0.0.0/8 proto tcp port 8000 + sudo ufw allow in to 10.0.0.0/8 proto tcp port 8000 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -95,10 +97,9 @@ jobs: kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & testkube config api-uri http://127.0.0.1:8088/v1 - curl http://127.0.0.1:8000/ kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "cat /etc/hosts" kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "nslookup host.k3d.internal" - kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "wget http://host.k3d.internal:8000/" + - name: Create Testkube Tests run: | From e960b382e119ab0b96bc07d2b4bb36c3f2100496 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 23:26:32 -0400 Subject: [PATCH 36/43] kubernetes tests --- .github/workflows/testkube.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index bc9fa88..f197400 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -30,8 +30,6 @@ jobs: - name: Configuring kube context and getting cluster info run: | - cat /etc/hosts - echo '127.0.0.1 kubernetes.docker.internal' | sudo tee -a /etc/hosts export KUBECONFIG=${HOME}/.kube/config kubectl cluster-info kubectl get pods -n kube-system @@ -40,7 +38,6 @@ jobs: echo "kubeconfig-file-location:" $KUBECONFIG echo "current-context:" $(kubectl config current-context) export KUBE_CONFIG_CONTEXT=$(kubectl config current-context) - sudo ufw allow 8000 sudo ufw allow in to 172.0.0.0/8 proto tcp port 8000 sudo ufw allow in to 10.0.0.0/8 proto tcp port 8000 @@ -97,16 +94,13 @@ jobs: kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & testkube config api-uri http://127.0.0.1:8088/v1 - kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "cat /etc/hosts" - kubectl exec -it --namespace=testkube $(kubectl get pods -o=name --namespace=testkube | grep testkube-api-server) -- /bin/sh -c "nslookup host.k3d.internal" - - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-root-test.json --variable apiHost=host.k3d.internal:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=host.k3d.internal:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type file-uri --file tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=host.k3d.internal:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type file-uri --file tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop.git --git-branch hm/testkube --git-path tests/testkube/curl/swoop-api-root-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop.git --git-branch hm/testkube --git-path tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop.git --git-branch hm/testkube --git-path tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type git-file --git-uri https://github.com/Element84/swoop.git --git-branch hm/testkube --git-path tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.k3d.internal:8000 - name: Running Testkube Tests run: | From ff4dccf048a00e10242468e8a562c49791c7dc0e Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Thu, 22 Jun 2023 23:37:44 -0400 Subject: [PATCH 37/43] kubernetes tests --- .github/workflows/testkube.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index f197400..28d7bf8 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -75,6 +75,7 @@ jobs: uses: actions/checkout@master with: repository: Element84/swoop-db + ref: hm/testkube path: swoop-db - name: Setup Postgres From 0e3f70afe106028e3878527c4661387b5d2e2d09 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Fri, 23 Jun 2023 06:56:31 -0400 Subject: [PATCH 38/43] Pinning swoop-db to v0.1.3 --- .github/workflows/testkube.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 28d7bf8..79fc691 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -75,7 +75,7 @@ jobs: uses: actions/checkout@master with: repository: Element84/swoop-db - ref: hm/testkube + ref: v0.1.3 path: swoop-db - name: Setup Postgres From b1e211b7c588295cba515032ecc8dbf998b06250 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Fri, 23 Jun 2023 08:21:16 -0400 Subject: [PATCH 39/43] Initializing testkube agent --- .github/workflows/testkube.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 79fc691..b169f37 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -91,17 +91,15 @@ jobs: echo "deb https://repo.testkube.io/linux linux main" | sudo tee -a /etc/apt/sources.list sudo apt-get update sudo apt-get install -y testkube - kubectl testkube install --no-confirm + helm repo add kubeshop https://kubeshop.github.io/helm-charts ; helm repo update && helm upgrade --install --reuse-values --create-namespace testkube kubeshop/testkube --set testkube-api.cloud.key=${{ secrets.TESTKUBE_CLOUD_KEY }} --set testkube-api.cloud.orgId=${{ secrets.TESTKUBE_ORG_ID }} --set testkube-api.cloud.envId=${{ secrets.TESTKUBE_ENV_ID }} --set testkube-api.minio.enabled=false --set mongodb.enabled=false --set testkube-dashboard.enabled=false --set testkube-api.cloud.url=agent.testkube.io:443 --namespace testkube kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube - kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & - testkube config api-uri http://127.0.0.1:8088/v1 - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop.git --git-branch hm/testkube --git-path tests/testkube/curl/swoop-api-root-test.json --variable apiHost=host.k3d.internal:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop.git --git-branch hm/testkube --git-path tests/testkube/curl/swoop-api-jobs-test.json --variable apiHost=host.k3d.internal:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop.git --git-branch hm/testkube --git-path tests/testkube/curl/swoop-api-payload-input-test.json --variable apiHost=host.k3d.internal:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type git-file --git-uri https://github.com/Element84/swoop.git --git-branch hm/testkube --git-path tests/testkube/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch hm/testkube --git-path tests/curl/swoop-api-root-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch hm/testkube --git-path tests/curl/swoop-api-jobs-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch hm/testkube --git-path tests/curl/swoop-api-payload-input-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch hm/testkube --git-path tests/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.k3d.internal:8000 - name: Running Testkube Tests run: | From 9db2f2a364e4456aa07e451bab4827ef4b0d28f6 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Fri, 23 Jun 2023 08:21:48 -0400 Subject: [PATCH 40/43] Initializing testkube agent --- tests/testkube/curl/swoop-api-jobs-test.json | 10 ------- .../curl/swoop-api-payload-input-test.json | 10 ------- tests/testkube/curl/swoop-api-root-test.json | 10 ------- .../k6/swoop-api-simple-k6-load-test.js | 26 ------------------- 4 files changed, 56 deletions(-) delete mode 100644 tests/testkube/curl/swoop-api-jobs-test.json delete mode 100644 tests/testkube/curl/swoop-api-payload-input-test.json delete mode 100644 tests/testkube/curl/swoop-api-root-test.json delete mode 100644 tests/testkube/k6/swoop-api-simple-k6-load-test.js diff --git a/tests/testkube/curl/swoop-api-jobs-test.json b/tests/testkube/curl/swoop-api-jobs-test.json deleted file mode 100644 index 5c675e9..0000000 --- a/tests/testkube/curl/swoop-api-jobs-test.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "command": [ - "curl", - "http://{{.apiHost}}/jobs/", - "-H", - "'Accept: application/json'" - ], - "expected_status": "200", - "expected_body": "{\"jobs\":[{\"processID\":\"action_2\",\"type\":\"process\",\"jobID\":\"81842304-0aa9-4609-89f0-1c86819b0752\",\"status\":\"accepted\",\"message\":null,\"created\":null,\"started\":null,\"finished\":null,\"updated\":\"2023-04-28T15:49:00+00:00\",\"progress\":null,\"links\":null,\"parentID\":\"2595f2da-81a6-423c-84db-935e6791046e\"},{\"processID\":\"action_1\",\"type\":\"process\",\"jobID\":\"2595f2da-81a6-423c-84db-935e6791046e\",\"status\":\"successful\",\"message\":null,\"created\":null,\"started\":null,\"finished\":null,\"updated\":\"2023-04-28T15:49:03+00:00\",\"progress\":null,\"links\":null,\"parentID\":\"cf8ff7f0-ce5d-4de6-8026-4e551787385f\"}],\"links\":[{\"href\":\"http://www.example.com\",\"rel\":null,\"type\":null,\"hreflang\":null,\"title\":null}]}" -} diff --git a/tests/testkube/curl/swoop-api-payload-input-test.json b/tests/testkube/curl/swoop-api-payload-input-test.json deleted file mode 100644 index fd39518..0000000 --- a/tests/testkube/curl/swoop-api-payload-input-test.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "command": [ - "curl", - "http://{{.apiHost}}/jobs/2595f2da-81a6-423c-84db-935e6791046e/payload", - "-H", - "'Accept: application/json'" - ], - "expected_status": "200", - "expected_body": "{\"process_id\":\"2595f2da-81a6-423c-84db-935e6791046e\",\"payload\":\"test_input\"}" -} diff --git a/tests/testkube/curl/swoop-api-root-test.json b/tests/testkube/curl/swoop-api-root-test.json deleted file mode 100644 index abed8d2..0000000 --- a/tests/testkube/curl/swoop-api-root-test.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "command": [ - "curl", - "http://{{.apiHost}}/", - "-H", - "'Accept: application/json'" - ], - "expected_status": "200", - "expected_body": "{\"title\":\"Example processing server\",\"description\":\"Example server implementing the OGC API - Processes 1.0 Standard\",\"links\":[{\"href\":\"http://{{.apiHost}}/conformance\",\"rel\":\"http://www.opengis.net/def/rel/ogc/1.0/conformance\",\"type\":\"application/json\",\"hreflang\":null,\"title\":null}]}" -} diff --git a/tests/testkube/k6/swoop-api-simple-k6-load-test.js b/tests/testkube/k6/swoop-api-simple-k6-load-test.js deleted file mode 100644 index b2d70a1..0000000 --- a/tests/testkube/k6/swoop-api-simple-k6-load-test.js +++ /dev/null @@ -1,26 +0,0 @@ -import http from 'k6/http'; -import {check,sleep} from 'k6'; - -export const options = { - stages: [ - { - duration: '5s', - target: 10 - }, - ], -}; - -export default function() { - const swoopApiRoot = http.get('http://' + __ENV.API_HOST + '/'); - check(swoopApiRoot, { - 'status of SWOOP API root test was 200': (r) => r.status == 200 - }); - const swoopApiJobs = http.get('http://' + __ENV.API_HOST + '/jobs/'); - check(swoopApiJobs, { - 'status of SWOOP API jobs endpoint (with swoop-db) test was 200': (r) => r.status == 200 - }); - const swoopApiJobPayload = http.get('http://' + __ENV.API_HOST + '/jobs/2595f2da-81a6-423c-84db-935e6791046e/payload'); - check(swoopApiJobPayload, { - 'status of SWOOP API payload input (with object storage) test was 200': (r) => r.status == 200 - }); -} From d9e1c2c2a6282916c41696c142a4176e400b56e6 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Fri, 23 Jun 2023 08:39:45 -0400 Subject: [PATCH 41/43] Switching to local testkube testing --- .github/workflows/testkube.yml | 4 +++- .gitignore | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index b169f37..f0210b0 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -91,8 +91,10 @@ jobs: echo "deb https://repo.testkube.io/linux linux main" | sudo tee -a /etc/apt/sources.list sudo apt-get update sudo apt-get install -y testkube - helm repo add kubeshop https://kubeshop.github.io/helm-charts ; helm repo update && helm upgrade --install --reuse-values --create-namespace testkube kubeshop/testkube --set testkube-api.cloud.key=${{ secrets.TESTKUBE_CLOUD_KEY }} --set testkube-api.cloud.orgId=${{ secrets.TESTKUBE_ORG_ID }} --set testkube-api.cloud.envId=${{ secrets.TESTKUBE_ENV_ID }} --set testkube-api.minio.enabled=false --set mongodb.enabled=false --set testkube-dashboard.enabled=false --set testkube-api.cloud.url=agent.testkube.io:443 --namespace testkube + kubectl testkube install --no-confirm kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube + kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & + testkube config api-uri http://127.0.0.1:8088/v1 - name: Create Testkube Tests run: | diff --git a/.gitignore b/.gitignore index 4b069eb..39d4ea1 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,4 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +.DS_Store From 5dcaf4851ec0dfac59c3d92590a7b068a1e461a8 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Fri, 23 Jun 2023 08:44:00 -0400 Subject: [PATCH 42/43] Adding testkube agent --- .github/workflows/testkube.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index f0210b0..2f8048e 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -91,17 +91,15 @@ jobs: echo "deb https://repo.testkube.io/linux linux main" | sudo tee -a /etc/apt/sources.list sudo apt-get update sudo apt-get install -y testkube - kubectl testkube install --no-confirm + helm repo add kubeshop https://kubeshop.github.io/helm-charts ; helm repo update && helm upgrade --install --reuse-values --create-namespace testkube kubeshop/testkube --set testkube-api.cloud.key=${{ secrets.TESTKUBE_CLOUD_KEY }} --set testkube-api.cloud.orgId=${{ secrets.TESTKUBE_ORG_ID }} --set testkube-api.cloud.envId=${{ secrets.TESTKUBE_ENV_ID }} --set testkube-api.minio.enabled=false --set mongodb.enabled=false --set testkube-dashboard.enabled=false --set testkube-api.cloud.url=agent.testkube.io:443 --namespace testkube kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube - kubectl port-forward -n testkube svc/testkube-api-server 8088:8088 & - testkube config api-uri http://127.0.0.1:8088/v1 - name: Create Testkube Tests run: | - testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch hm/testkube --git-path tests/curl/swoop-api-root-test.json --variable apiHost=host.k3d.internal:8000 - testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch hm/testkube --git-path tests/curl/swoop-api-jobs-test.json --variable apiHost=host.k3d.internal:8000 - testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch hm/testkube --git-path tests/curl/swoop-api-payload-input-test.json --variable apiHost=host.k3d.internal:8000 - testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch hm/testkube --git-path tests/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch main --git-path tests/curl/swoop-api-root-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch main --git-path tests/curl/swoop-api-jobs-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-payload-input-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch main --git-path tests/curl/swoop-api-payload-input-test.json --variable apiHost=host.k3d.internal:8000 + testkube create test --namespace testkube --name swoop-api-simple-k6-load-test --type k6/script --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch main --git-path tests/k6/swoop-api-simple-k6-load-test.js --variable API_HOST=host.k3d.internal:8000 - name: Running Testkube Tests run: | From ed4e32834762fca6e0ca321dd67b5ecfd8142805 Mon Sep 17 00:00:00 2001 From: Hector Machin Date: Fri, 23 Jun 2023 08:53:51 -0400 Subject: [PATCH 43/43] continuing even if tests creation errors out because it exists --- .github/workflows/testkube.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testkube.yml b/.github/workflows/testkube.yml index 2f8048e..1932eb1 100644 --- a/.github/workflows/testkube.yml +++ b/.github/workflows/testkube.yml @@ -95,6 +95,7 @@ jobs: kubectl wait --for=condition=ready --timeout=30m pod -n testkube -l app.kubernetes.io/instance=testkube - name: Create Testkube Tests + continue-on-error: true run: | testkube create test --namespace testkube --name swoop-api-root-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch main --git-path tests/curl/swoop-api-root-test.json --variable apiHost=host.k3d.internal:8000 testkube create test --namespace testkube --name swoop-api-jobs-test --type curl/test --test-content-type git-file --git-uri https://github.com/Element84/swoop-testkube.git --git-branch main --git-path tests/curl/swoop-api-jobs-test.json --variable apiHost=host.k3d.internal:8000