Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Testsuites updated after v3, run script, k6 test fixed after workingpath change #4143

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/k6/executor-tests/crd/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ spec:
args:
- -e
- K6_ENV_FROM_PARAM=K6_ENV_FROM_PARAM_value
- test/k6/executor-tests/k6-smoke-test.js # should be possible to remove path after working_dir feature
- k6-smoke-test.js
44 changes: 24 additions & 20 deletions test/scripts/executor-tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ print_title() {
printf "\n$border\n=== $1\n$border\n"
}

create_update_testsuite() { # testsuite_name testsuite_path
create_update_testsuite_json() { # testsuite_name testsuite_path
exit_code=0
type=""
kubectl testkube get testsuite $1 > /dev/null 2>&1 || exit_code=$?
Expand All @@ -51,6 +51,10 @@ create_update_testsuite() { # testsuite_name testsuite_path
fi
}

create_update_testsuite() { # testsuite_path
kubectl apply -f $1
}

run_follow_testsuite() { # testsuite_name
follow_param=''
if [ "$follow" = true ] ; then
Expand Down Expand Up @@ -92,7 +96,7 @@ common_run() { # name, test_crd_file, testsuite_name, testsuite_file, custom_exe
kubectl apply -f $test_crd_file

# TestsSuites
create_update_testsuite "$testsuite_name" "$testsuite_file"
create_update_testsuite "$testsuite_file"
fi

if [ "$run" = true ] && [ "$custom_testsuite" = '' ]; then
Expand All @@ -104,7 +108,7 @@ artillery-smoke() {
name="artillery"
test_crd_file="test/artillery/executor-smoke/crd/crd.yaml"
testsuite_name="executor-artillery-smoke-tests"
testsuite_file="test/suites/executor-artillery-smoke-tests.json"
testsuite_file="test/suites/executor-artillery-smoke-tests.yaml"

common_run "$name" "$test_crd_file" "$testsuite_name" "$testsuite_file"
}
Expand All @@ -113,7 +117,7 @@ container-curl-smoke() {
name="Container executor - Curl"
test_crd_file="test/container-executor/executor-smoke/crd/curl.yaml"
testsuite_name="executor-container-curl-smoke-tests"
testsuite_file="test/suites/executor-container-curl-smoke-tests.json"
testsuite_file="test/suites/executor-container-curl-smoke-tests.yaml"

custom_executor_crd_file="test/executors/container-executor-curl.yaml"

Expand All @@ -124,7 +128,7 @@ container-cypress-smoke() {
name="Container executor - Cypress"
test_crd_file="test/container-executor/executor-smoke/crd/cypress.yaml"
testsuite_name="executor-container-cypress-smoke-tests"
testsuite_file="test/suites/executor-container-cypress-smoke-tests.json"
testsuite_file="test/suites/executor-container-cypress-smoke-tests.yaml"

custom_executor_crd_file="test/executors/container-executor-cypress.yaml"

Expand All @@ -135,7 +139,7 @@ container-k6-smoke() {
name="Container executor - K6"
test_crd_file="test/container-executor/executor-smoke/crd/k6.yaml"
testsuite_name="executor-container-k6-smoke-tests"
testsuite_file="test/suites/executor-container-k6-smoke-tests.json"
testsuite_file="test/suites/executor-container-k6-smoke-tests.yaml"

custom_executor_crd_file="test/executors/container-executor-k6.yaml"

Expand All @@ -146,7 +150,7 @@ container-playwright-smoke() {
name="Container executor - Playwright"
test_crd_file="test/container-executor/executor-smoke/crd/playwright.yaml"
testsuite_name="executor-container-playwright-smoke-tests"
testsuite_file="test/suites/executor-container-playwright-smoke-tests.json"
testsuite_file="test/suites/executor-container-playwright-smoke-tests.yaml"

custom_executor_crd_file="test/executors/container-executor-playwright.yaml"

Expand All @@ -157,7 +161,7 @@ curl-smoke() {
name="curl"
test_crd_file="test/curl/executor-tests/crd/smoke.yaml"
testsuite_name="executor-curl-smoke-tests"
testsuite_file="test/suites/executor-curl-smoke-tests.json"
testsuite_file="test/suites/executor-curl-smoke-tests.yaml"

common_run "$name" "$test_crd_file" "$testsuite_name" "$testsuite_file"
}
Expand All @@ -166,7 +170,7 @@ cypress-smoke() {
name="Cypress"
test_crd_file="test/cypress/executor-tests/crd/crd.yaml"
testsuite_name="executor-cypress-smoke-tests"
testsuite_file="test/suites/executor-cypress-smoke-tests.json"
testsuite_file="test/suites/executor-cypress-smoke-tests.yaml"

custom_executor_crd_file="test/executors/cypress.yaml"

Expand All @@ -177,7 +181,7 @@ ginkgo-smoke() {
name="Ginkgo"
test_crd_file="test/ginkgo/executor-tests/crd/smoke.yaml"
testsuite_name="executor-ginkgo-smoke-tests"
testsuite_file="test/suites/executor-ginkgo-smoke-tests.json"
testsuite_file="test/suites/executor-ginkgo-smoke-tests.yaml"

common_run "$name" "$test_crd_file" "$testsuite_name" "$testsuite_file"
}
Expand All @@ -186,7 +190,7 @@ gradle-smoke() {
name="Gradle"
test_crd_file="test/gradle/executor-smoke/crd/crd.yaml"
testsuite_name="executor-gradle-smoke-tests"
testsuite_file="test/suites/executor-gradle-smoke-tests.json"
testsuite_file="test/suites/executor-gradle-smoke-tests.yaml"

custom_executor_crd_file="test/executors/gradle.yaml"

Expand All @@ -197,7 +201,7 @@ jmeter-smoke() {
name="JMeter"
test_crd_file="test/jmeter/executor-tests/crd/smoke.yaml"
testsuite_name="executor-jmeter-smoke-tests"
testsuite_file="test/suites/executor-jmeter-smoke-tests.json"
testsuite_file="test/suites/executor-jmeter-smoke-tests.yaml"

common_run "$name" "$test_crd_file" "$testsuite_name" "$testsuite_file"
}
Expand All @@ -206,7 +210,7 @@ k6-smoke() {
name="k6 smoke"
test_crd_file="test/k6/executor-tests/crd/smoke.yaml"
testsuite_name="executor-k6-smoke-tests"
testsuite_file="test/suites/executor-k6-smoke-tests.json"
testsuite_file="test/suites/executor-k6-smoke-tests.yaml"

common_run "$name" "$test_crd_file" "$testsuite_name" "$testsuite_file"
}
Expand All @@ -215,7 +219,7 @@ k6-other() {
name="k6 other"
test_crd_file="test/k6/executor-tests/crd/other.yaml"
testsuite_name="executor-k6-other-tests"
testsuite_file="test/suites/executor-k6-other-tests.json"
testsuite_file="test/suites/executor-k6-other-tests.yaml"

common_run "$name" "$test_crd_file" "$testsuite_name" "$testsuite_file"
}
Expand All @@ -224,7 +228,7 @@ kubepug-smoke() {
name="kubepug"
test_crd_file="test/kubepug/executor-smoke/crd/crd.yaml"
testsuite_name="executor-kubepug-smoke-tests"
testsuite_file="test/suites/executor-kubepug-smoke-tests.json"
testsuite_file="test/suites/executor-kubepug-smoke-tests.yaml"

common_run "$name" "$test_crd_file" "$testsuite_name" "$testsuite_file"
}
Expand All @@ -233,7 +237,7 @@ maven-smoke() {
name="Maven"
test_crd_file="test/maven/executor-smoke/crd/crd.yaml"
testsuite_name="executor-maven-smoke-tests"
testsuite_file="test/suites/executor-maven-smoke-tests.json"
testsuite_file="test/suites/executor-maven-smoke-tests.yaml"

custom_executor_crd_file="test/executors/maven.yaml"

Expand All @@ -244,7 +248,7 @@ playwright-smoke() {
name="playwright"
test_crd_file="test/playwright/executor-tests/crd/crd.yaml"
testsuite_name="executor-playwright-smoke-tests"
testsuite_file="test/suites/executor-playwright-smoke-tests.json"
testsuite_file="test/suites/executor-playwright-smoke-tests.yaml"

common_run "$name" "$test_crd_file" "$testsuite_name" "$testsuite_file"
}
Expand All @@ -253,7 +257,7 @@ postman-smoke() {
name="postman"
test_crd_file="test/postman/executor-tests/crd/crd.yaml"
testsuite_name="executor-postman-smoke-tests"
testsuite_file="test/suites/executor-postman-smoke-tests.json"
testsuite_file="test/suites/executor-postman-smoke-tests.yaml"

common_run "$name" "$test_crd_file" "$testsuite_name" "$testsuite_file"
}
Expand All @@ -262,7 +266,7 @@ soapui-smoke() {
name="SoapUI"
test_crd_file="test/soapui/executor-smoke/crd/crd.yaml"
testsuite_name="executor-soapui-smoke-tests"
testsuite_file="test/suites/executor-soapui-smoke-tests.json"
testsuite_file="test/suites/executor-soapui-smoke-tests.yaml"

common_run "$name" "$test_crd_file" "$testsuite_name" "$testsuite_file"
}
Expand Down Expand Up @@ -315,7 +319,7 @@ main() {
filename=$(basename $custom_testsuite)
testsuite_name="${filename%%.*}"

create_update_testsuite "$testsuite_name" "$custom_testsuite"
create_update_testsuite "$custom_testsuite"
run_follow_testsuite "$testsuite_name"
fi
}
Expand Down
8 changes: 0 additions & 8 deletions test/suites/executor-artillery-smoke-tests.json

This file was deleted.

12 changes: 12 additions & 0 deletions test/suites/executor-artillery-smoke-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: tests.testkube.io/v3
kind: TestSuite
metadata:
name: executor-artillery-smoke-tests
namespace: testkube
spec:
description: artillery executor smoke tests
steps:
- stopOnFailure: false
execute:
- test: artillery-executor-smoke
- test: artillery-executor-smoke-negative
8 changes: 0 additions & 8 deletions test/suites/executor-container-curl-smoke-tests.json

This file was deleted.

16 changes: 16 additions & 0 deletions test/suites/executor-container-curl-smoke-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: tests.testkube.io/v3
kind: TestSuite
metadata:
name: executor-container-curl-smoke-tests
namespace: testkube
labels:
app: testkube
spec:
description: "container executor curl smoke tests"
steps:
- stopOnFailure: false
execute:
- test: container-executor-curl-smoke
- stopOnFailure: false
execute:
- test: container-executor-curl-smoke-negative
8 changes: 0 additions & 8 deletions test/suites/executor-container-cypress-smoke-tests.json

This file was deleted.

16 changes: 16 additions & 0 deletions test/suites/executor-container-cypress-smoke-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: tests.testkube.io/v3
kind: TestSuite
metadata:
name: executor-container-cypress-smoke-tests
namespace: testkube
labels:
app: testkube
spec:
description: "container executor cypress smoke tests"
steps:
- stopOnFailure: false
execute:
- test: container-executor-cypress-v12.7.0-smoke
- stopOnFailure: false
execute:
- test: container-executor-cypress-v12.7.0-smoke-git-dir
8 changes: 0 additions & 8 deletions test/suites/executor-container-k6-smoke-tests.json

This file was deleted.

16 changes: 16 additions & 0 deletions test/suites/executor-container-k6-smoke-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: tests.testkube.io/v3
kind: TestSuite
metadata:
name: executor-container-k6-smoke-tests
namespace: testkube
labels:
app: testkube
spec:
description: "container executor k6 smoke tests"
steps:
- stopOnFailure: false
execute:
- test: container-executor-k6-smoke
- stopOnFailure: false
execute:
- test: container-executor-k6-smoke-git-file
7 changes: 0 additions & 7 deletions test/suites/executor-container-playwright-smoke-tests.json

This file was deleted.

13 changes: 13 additions & 0 deletions test/suites/executor-container-playwright-smoke-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: tests.testkube.io/v3
kind: TestSuite
metadata:
name: executor-container-playwright-smoke-tests
namespace: testkube
labels:
app: testkube
spec:
description: "container executor playwright smoke tests"
steps:
- stopOnFailure: false
execute:
- test: container-executor-playwright-smoke
8 changes: 0 additions & 8 deletions test/suites/executor-curl-smoke-tests.json

This file was deleted.

16 changes: 16 additions & 0 deletions test/suites/executor-curl-smoke-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: tests.testkube.io/v3
kind: TestSuite
metadata:
name: executor-curl-smoke-tests
namespace: testkube
labels:
app: testkube
spec:
description: "curl executor smoke tests"
steps:
- stopOnFailure: false
execute:
- test: curl-executor-smoke
- stopOnFailure: false
execute:
- test: curl-executor-smoke-negative
28 changes: 0 additions & 28 deletions test/suites/executor-cypress-smoke-tests.json

This file was deleted.

Loading