Skip to content

Commit e19f178

Browse files
committed
fix: helm tests, seem like they need more time in this env
1 parent 697c8fa commit e19f178

File tree

4 files changed

+22
-19
lines changed

4 files changed

+22
-19
lines changed

.github/workflows/operator-ci.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,21 @@ env:
5454

5555
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
5656
jobs:
57+
unit-test:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v4
61+
- name: Setup Go 1.23
62+
uses: actions/setup-go@v5
63+
with:
64+
go-version: 1.23
65+
- name: Unit tests
66+
run: |
67+
cd operator
68+
make unit-tests
5769
k8s-tests:
5870
runs-on: ubuntu-latest
71+
needs: [unit-test] # Don't run the k8s tests if the unit tests fail
5972
steps:
6073
- uses: actions/checkout@v4
6174
with:
@@ -81,7 +94,7 @@ jobs:
8194
run: |
8295
cd operator
8396
GITHUB_TOKEN=${{ secrets.github_token }} make create-kind-cluster
84-
make test
97+
make e2e-tests
8598
build-and-push-operator:
8699
runs-on: ubuntu-latest
87100
needs: [k8s-tests] # Don't run the build and push if the k8s tests fail
@@ -112,6 +125,8 @@ jobs:
112125

113126
- name: Build the operator container image
114127
id: build
128+
env:
129+
platforms: ${{ env.PLATFORMS }}
115130
run: |
116131
apt-get update && apt-get install -y make git jq
117132
cd operator

k8s-tests/chainsaw/helm/helm-chart-test/chainsaw-test.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,18 @@
1818
# LICENSE END
1919
#
2020

21-
22-
23-
24-
25-
26-
2721
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json
2822
apiVersion: chainsaw.kyverno.io/v1alpha1
2923
kind: Test
3024
metadata:
3125
name: helm-chart
3226
spec:
33-
description: This test asserts that the helm chart is working as expected. Specifcally it asserts that the helm chart works when given a different
27+
description: This test asserts that the helm chart is working as expected. Specifically it asserts that the helm chart works when given a different
3428
deployment name than skyhook-operator and that the tolerations that are given to the chart through a values file work as expected.
3529
concurrent: false
3630
timeouts:
37-
assert: 120s
38-
exec: 120s
31+
assert: 240s
32+
exec: 240s
3933
steps:
4034
- try:
4135
- script:

k8s-tests/chainsaw/helm/helm-scale-test/chainsaw-test.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818
# LICENSE END
1919
#
2020

21-
22-
23-
24-
25-
26-
2721
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json
2822
apiVersion: chainsaw.kyverno.io/v1alpha1
2923
kind: Test
@@ -34,8 +28,8 @@ spec:
3428
deployment name than skyhook-operator and that the tolerations that are given to the chart through a values file work as expected.
3529
concurrent: false
3630
timeouts:
37-
assert: 120s
38-
exec: 120s
31+
assert: 240s
32+
exec: 240s
3933
steps:
4034
- try:
4135
- script:

operator/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ merge-coverage:
223223
echo "mode: set" > $(REPORTING)/cover.out
224224
## skip first line with +2
225225
tail -n +2 $(REPORTING)/temp-cover.out | sed '/mode: set/d' >> $(REPORTING)/cover.out
226-
$(sedrp) 's/^\/.*(\/skyhook\/operator.*)/github\.com\/NVIDIA\1/g' $(REPORTING)/cover.out ## TODO: need to test more
226+
$(sedrp) 's|^/.*skyhook/operator/(.*)$$|github\.com/NVIDIA/skyhook/\1|g' $(REPORTING)/cover.out
227227

228228
.PHONY: lint
229229
lint: golangci-lint license-check ## Run golangci-lint linter & yamllint

0 commit comments

Comments
 (0)