Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoravong committed Sep 13, 2024
1 parent 13281f4 commit cd5b4ed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/functional_test_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ on:
workflow_dispatch:
inputs:
UPDATE_EXPECTED_RESULTS:
description: 'Set this to true to update expected results and collect updated test output as a Github workflow artifact.'
description: 'Set this to update expected results and collect updated test output as a GitHub workflow artifact.'
required: false
default: false
type: choice
options:
- true
- false

env:
# Make sure to exit early if cache segment download times out after 2 minutes.
# We limit cache download as a whole to 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
UPDATE_EXPECTED_RESULTS: ${{ github.event.inputs.UPDATE_EXPECTED_RESULTS || 'false' }}

jobs:
kubernetes-test:
env:
Expand Down Expand Up @@ -68,19 +72,19 @@ jobs:
- name: Deploy cert-manager
run: |
make cert-manager
- name: run functional tests
- name: Run functional tests
env:
K8S_VERSION: ${{ matrix.k8s-version }}
UPDATE_EXPECTED_RESULTS: ${{ github.event.inputs.UPDATE_EXPECTED_RESULTS || 'false' }}
UPDATE_EXPECTED_RESULTS: ${{ github.env.UPDATE_EXPECTED_RESULTS }}
run: |
cd functional_tests
TEARDOWN_BEFORE_SETUP=true UPDATE_EXPECTED_RESULTS=${{ env.UPDATE_EXPECTED_RESULTS }} go test -v -tags ${{ matrix.test-job }}
TEARDOWN_BEFORE_SETUP=true UPDATE_EXPECTED_RESULTS=${{ github.env.UPDATE_EXPECTED_RESULTS }} go test -v -tags ${{ matrix.test-job }}
- name: 'Upload test results'
if: failure() && env.UPDATE_EXPECTED_RESULTS == 'true'
if: ${{ github.event.inputs.UPDATE_EXPECTED_RESULTS == 'true' }}
uses: actions/upload-artifact@v4
with:
name: functional_tests-${{ matrix.test-job }}-${{ matrix.k8s-version }}
path: functional_tests/results
path: /results
retention-days: 5

eks-test:
Expand Down
5 changes: 5 additions & 0 deletions functional_tests/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ func setupOnce(t *testing.T) *sinks {
t.Log("Skipping setup as SKIP_SETUP is set to true")
return
}
// deploy the chart and applications.
if os.Getenv("SKIP_SETUP") == "true" {
t.Log("Skipping setup as SKIP_SETUP is set to true")
return
}
deployChartsAndApps(t)
})

Expand Down

0 comments on commit cd5b4ed

Please sign in to comment.