Skip to content

Commit

Permalink
fix: change default test website
Browse files Browse the repository at this point in the history
  • Loading branch information
haneabogdan committed Oct 10, 2024
1 parent 2847b2f commit bc59522
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 118 deletions.
Binary file added cmd/testworkflow-toolkit/testworkflow-toolkit
Binary file not shown.
4 changes: 2 additions & 2 deletions contrib/executor/example/pkg/runner/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestRun(t *testing.T) {
ctx,
testkube.Execution{
Content: &testkube.TestContent{
Uri: "https://testkube.io",
Uri: "https://testkube-test-page-lipsum.pages.dev/",
},
})

Expand All @@ -32,7 +32,7 @@ func TestRun(t *testing.T) {
ctx,
testkube.Execution{
Content: &testkube.TestContent{
Uri: "https://testkube.io/some-non-existing-uri-blablablabl",
Uri: "https://testkube-test-page-lipsum.pages.dev/some-non-existing-uri-blablablabl",
},
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (
DefaultInitPath = filepath.Join(DefaultInternalPath, "init")
DefaultToolkitPath = filepath.Join(DefaultInternalPath, "toolkit")
DefaultTransferDirPath = filepath.Join(DefaultInternalPath, "transfer")
DefaultTmpDirPath = filepath.Join(DefaultInternalPath, "tmp")
DefaultTmpDirPath = "/tmp"
DefaultTransferPort = 60433
DefaultShellHeader = "set -e\n"
DefaultContainerConfig = testworkflowsv1.ContainerConfig{
Expand Down
36 changes: 20 additions & 16 deletions test/curl/executor-tests/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ spec:
cpu: 32m
memory: 32Mi
steps:
- name: Run tests
shell: curl -f -LI https://testkube.io
container:
image: curlimages/curl:8.7.1
- name: Run tests
shell: curl -f -LI https://testkube-test-page-lipsum.pages.dev/
container:
image: curlimages/curl:8.7.1
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
Expand All @@ -25,17 +25,17 @@ metadata:
spec:
pod:
imagePullSecrets:
- name: example-private-registry-credentials
- name: example-private-registry-credentials
container:
resources:
requests:
cpu: 32m
memory: 32Mi
steps:
- name: Run tests
shell: curl -f -LI https://testkube.io && sleep 10
container:
image: tkoniecznykubeshop/example-private-repo:curl-8.7.1
- name: Run tests
shell: curl -f -LI https://testkube-test-page-lipsum.pages.dev/ && sleep 10
container:
image: tkoniecznykubeshop/example-private-repo:curl-8.7.1
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
Expand All @@ -50,10 +50,14 @@ spec:
cpu: 32m
memory: 32Mi
steps:
- name: Run tests
parallel:
matrix:
url: ['https://testkube.io', 'https://docs.testkube.io']
shell: curl -f -LI '{{ matrix.url }}'
container:
image: curlimages/curl:8.7.1
- name: Run tests
parallel:
matrix:
url:
[
"https://testkube-test-page-lipsum.pages.dev/",
"https://docs.testkube.io",
]
shell: curl -f -LI '{{ matrix.url }}'
container:
image: curlimages/curl:8.7.1
9 changes: 3 additions & 6 deletions test/curl/executor-tests/curl-smoke-test-negative.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"command": [
"curl",
"https://testkube.io/"
],
"expected_status": "418"
}
"command": ["curl", "https://testkube-test-page-lipsum.pages.dev/"],
"expected_status": "418"
}
9 changes: 3 additions & 6 deletions test/curl/executor-tests/curl-smoke-test.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"command": [
"curl",
"https://testkube.io/"
],
"expected_status": "200"
}
"command": ["curl", "https://testkube-test-page-lipsum.pages.dev/"],
"expected_status": "200"
}
24 changes: 12 additions & 12 deletions test/examples/status-page/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,50 @@ metadata:
name: tw-testkube-website-5m
spec:
events:
- cronjob:
cron: '*/5 * * * *'
- cronjob:
cron: "*/5 * * * *"
container:
image: curlimages/curl:8.7.1
resources:
requests:
cpu: 32m
memory: 32Mi
steps:
- name: Run tests
shell: curl -f -LI https://testkube.io
- name: Run tests
shell: curl -f -LI https://testkube-test-page-lipsum.pages.dev/
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: tw-testkube-docs-5m
spec:
events:
- cronjob:
cron: '*/5 * * * *'
- cronjob:
cron: "*/5 * * * *"
container:
image: curlimages/curl:8.7.1
resources:
requests:
cpu: 32m
memory: 32Mi
steps:
- name: Run tests
shell: curl -f -LI https://docs.testkube.io
- name: Run tests
shell: curl -f -LI https://docs.testkube.io
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: tw-testkube-blog-5m
spec:
events:
- cronjob:
cron: '*/5 * * * *'
- cronjob:
cron: "*/5 * * * *"
container:
image: curlimages/curl:8.7.1
resources:
requests:
cpu: 32m
memory: 32Mi
steps:
- name: Run tests
shell: curl -f -LI https://testkube.io/blog
- name: Run tests
shell: curl -f -LI https://testkube-test-page-lipsum.pages.dev/
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @ts-check
const { test, expect } = require('@playwright/test');
const { test, expect } = require("@playwright/test");

test('Smoke 1 - has title', async ({ page }) => {
await page.goto('https://testkube.io/');
test("Smoke 1 - has title", async ({ page }) => {
await page.goto("https://testkube-test-page-lipsum.pages.dev/");

await expect(page).toHaveTitle(/Testkube/);
});
});
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @ts-check
const { test, expect } = require('@playwright/test');
const { test, expect } = require("@playwright/test");

test('Smoke 2 - has title', async ({ page }) => {
await page.goto('https://testkube.io/');
test("Smoke 2 - has title", async ({ page }) => {
await page.goto("https://testkube-test-page-lipsum.pages.dev/");

await expect(page).toHaveTitle(/Testkube/);
});
});
126 changes: 59 additions & 67 deletions test/postman/VeryLong.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,60 @@
{
"info": {
"_postman_id": "2256b413-1c9d-4e3f-9ec4-a50c00cec6e7",
"name": "VeryLong",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "3706349"
},
"item": [
{
"name": "Getall",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" for(i=0; i<100;i++) {",
" let j = i",
" setTimeout(function(){",
" console.log(\"running \", j, \"request\")",
" pm.sendRequest('https://testkube.io/?no='+j, function (err, response) {",
" pm.expect(response.code).to.eq(200);",
" });",
" }, 1000*j);",
" }",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://kubeshop.github.io",
"protocol": "https",
"host": [
"kubeshop",
"github",
"io"
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
"info": {
"_postman_id": "2256b413-1c9d-4e3f-9ec4-a50c00cec6e7",
"name": "VeryLong",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "3706349"
},
"item": [
{
"name": "Getall",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" for(i=0; i<100;i++) {",
" let j = i",
" setTimeout(function(){",
" console.log(\"running \", j, \"request\")",
" pm.sendRequest('https://testkube-test-page-lipsum.pages.dev/?no='+j, function (err, response) {",
" pm.expect(response.code).to.eq(200);",
" });",
" }, 1000*j);",
" }",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://kubeshop.github.io",
"protocol": "https",
"host": ["kubeshop", "github", "io"]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [""]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [""]
}
}
]
}

0 comments on commit bc59522

Please sign in to comment.