Skip to content

Commit 2960905

Browse files
committed
Test fix
1 parent 699a9a5 commit 2960905

3 files changed

Lines changed: 27 additions & 10 deletions

File tree

deployment/codefresh-test.yaml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,26 @@ steps:
1313
repo: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
1414
revision: ${{CF_BRANCH}}
1515
git: github
16+
post_main_clone:
17+
title: Post main clone
18+
type: parallel
19+
stage: prepare
20+
steps:
21+
clone_cloud_harness:
22+
title: Cloning cloud-harness repository...
23+
type: git-clone
24+
stage: prepare
25+
repo: https://github.com/MetaCell/cloud-harness.git
26+
revision: ${{CLOUDHARNESS_BRANCH}}
27+
working_directory: .
28+
git: github
1629
prepare_deployment:
1730
title: Prepare helm chart
1831
image: python:3.12
1932
stage: prepare
2033
working_directory: .
2134
commands:
22-
- bash ./install.sh
35+
- bash cloud-harness/install.sh
2336
- export HELM_NAME_ARG="$( [ -n "${{CHART_NAME}}" ] && printf -- "--name %s" "${{CHART_NAME}}"
2437
)"
2538
- export HELM_CHART_VERSION_ARG="$( [ -n "${{CHART_VERSION}}" ] && printf -- "--chart-version
@@ -531,11 +544,11 @@ steps:
531544
commands:
532545
- kubectl config use-context ${{CLUSTER_NAME}}
533546
- kubectl config set-context --current --namespace=test-${{NAMESPACE_BASENAME}}
534-
- kubectl rollout status deployment/workflows
535-
- kubectl rollout status deployment/accounts
536-
- kubectl rollout status deployment/volumemanager
537547
- kubectl rollout status deployment/samples
548+
- kubectl rollout status deployment/accounts
538549
- kubectl rollout status deployment/common
550+
- kubectl rollout status deployment/volumemanager
551+
- kubectl rollout status deployment/workflows
539552
- sleep 60
540553
tests_nfs_failover:
541554
stage: qa
@@ -564,6 +577,10 @@ steps:
564577
image: alpine
565578
commands:
566579
- cf_export FAILED=failed
580+
when:
581+
condition:
582+
all:
583+
nfs_test_enabled: '"${{TEST_NFS_FAILOVER}}" == "true"'
567584
tests_api:
568585
stage: qa
569586
title: Api tests
@@ -599,12 +616,12 @@ steps:
599616
- ${{CF_REPO_NAME}}/applications/samples:/home/test
600617
- ${{CF_REPO_NAME}}/deployment/helm/values.yaml:/opt/cloudharness/resources/allvalues.yaml
601618
environment:
602-
- APP_URL=https://samples.${{DOMAIN}}/api
619+
- APP_URL=https://www.${{DOMAIN}}/api
603620
- USERNAME=sample@testuser.com
604621
- PASSWORD=test
605622
commands:
606623
- st --pre-run cloudharness_test.apitest_init run api/openapi.yaml --base-url
607-
https://samples.${{DOMAIN}}/api -c all --skip-deprecated-operations --exclude-operation-id=submit_sync
624+
https://www.${{DOMAIN}}/api -c all --skip-deprecated-operations --exclude-operation-id=submit_sync
608625
--exclude-operation-id=submit_sync_with_results --exclude-operation-id=error
609626
--hypothesis-suppress-health-check=too_slow --hypothesis-deadline=180000
610627
--request-timeout=180000 --hypothesis-max-examples=2 --show-trace --exclude-checks=ignored_auth
@@ -636,7 +653,7 @@ steps:
636653
volumes:
637654
- ${{CF_REPO_NAME}}/applications/samples/test/e2e:/home/test/__tests__/samples
638655
environment:
639-
- APP_URL=https://samples.${{DOMAIN}}
656+
- APP_URL=https://www.${{DOMAIN}}
640657
- USERNAME=sample@testuser.com
641658
- PASSWORD=test
642659
hooks:

tools/cloudharness-test/cloudharness_test/apitest_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
if "APP_URL" or "APP_SCHEMA_FILE" in os.environ:
1212
app_schema = os.environ.get("APP_SCHEMA_FILE", None)
13-
app_url = os.environ.get("APP_URL", "http://samples.ch.local/api")
13+
app_url = os.environ.get("APP_URL", "http://www.ch.local/api")
1414

1515
parsed_url = urlparse(app_url)
1616
base_url = f"{parsed_url.scheme}://{parsed_url.netloc}".rstrip("/")

tools/deployment-cli-tools/tests/test_codefresh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def test_create_codefresh_configuration_tests():
226226

227227
assert "samples_e2e_test" in e2e_steps, "samples e2e test step must be included"
228228
test_step = e2e_steps["samples_e2e_test"]
229-
assert "APP_URL=https://samples.${{DOMAIN}}" in test_step[
229+
assert "APP_URL=https://www.${{DOMAIN}}" in test_step[
230230
'environment'], "APP_URL must be provided as environment variable"
231231
assert len(test_step['volumes']) == 1
232232

@@ -235,7 +235,7 @@ def test_create_codefresh_configuration_tests():
235235
assert "test-api" in l1_steps[STEP_1]["steps"]["test-api"]["dockerfile"], "test-api image must be built from root context"
236236
api_steps = l1_steps['tests_api']['scale']
237237
test_step = api_steps["samples_api_test"]
238-
assert "APP_URL=https://samples.${{DOMAIN}}/api" in test_step[
238+
assert "APP_URL=https://www.${{DOMAIN}}/api" in test_step[
239239
'environment'], "APP_URL must be provided as environment variable"
240240
assert len(test_step['volumes']) == 2
241241

0 commit comments

Comments
 (0)