Skip to content

Commit 0df9dd2

Browse files
committed
#2003 Update helm unit-tests
1 parent 4e3f8c2 commit 0df9dd2

2 files changed

Lines changed: 61 additions & 29 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323
KIND_BINARY_VERSION: "v0.20.0"
2424
KUBECTL_VERSION: "v1.27.4"
2525
HELM_VERSION: "v3.12.2"
26-
HELM_PLUGIN_UNITTEST: "0.3.5"
26+
HELM_PLUGIN_UNITTEST: "0.4.1"
2727

2828
jobs:
2929
# ---- NVM Setup ----
@@ -54,7 +54,6 @@ jobs:
5454
path: ./nvm-node.tar.gz
5555
retention-days: 1
5656

57-
5857
test-nodejs-scanner-test-helpers:
5958
name: "Unit Test | Node.js Scanner Test Helpers"
6059
needs:
@@ -152,7 +151,7 @@ jobs:
152151
- name: Install Helm Unit Test Plugin
153152
run: |
154153
helm plugin install https://github.com/helm-unittest/helm-unittest.git --version ${{ env.HELM_PLUGIN_UNITTEST }}
155-
154+
156155
- name: Helm-Chart Unit Tests | Operator
157156
working-directory: ./operator
158157
run: make helm-unit-tests
@@ -186,7 +185,7 @@ jobs:
186185
steps:
187186
- uses: actions/checkout@v4
188187
with:
189-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
188+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
190189
- name: Set up JDK 17
191190
uses: actions/setup-java@v4
192191
with:
@@ -208,7 +207,7 @@ jobs:
208207
restore-keys: ${{ runner.os }}-gradle
209208
- name: Build and analyze
210209
env:
211-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
210+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
212211
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
213212
working-directory: hooks/${{ matrix.unit }}/hook
214213
run: ./gradlew build --info
@@ -296,7 +295,7 @@ jobs:
296295
auto-discovery-kubernetes-secret-extraction-container:
297296
name: "Autodiscovery | Kubernetes | SecretExtractionInitContainer"
298297
runs-on: ubuntu-22.04
299-
needs:
298+
needs:
300299
- nvm-setup
301300
- k8s-setup
302301
steps:
@@ -733,7 +732,6 @@ jobs:
733732
docker load --input /tmp/hook-sdk.tar
734733
docker images | grep sdk
735734
736-
737735
# ---- K8s Cluster Setup ---- #
738736

739737
- name: Download Kind

‎operator/tests/__snapshot__/operator_test.yaml.snap‎

Lines changed: 56 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
11
matches the snapshot:
22
1: |
3-
raw: "\nsecureCodeBox Operator Deployed \U0001F680\n\nThe operator can orchestrate the execution of various security scanning tools inside of your cluster.\nYou can find a list of all officially supported scanners here: https://www.securecodebox.io/\nThe website also lists other integrations, like persisting scan results to DefectDojo or Elasticsearch.\n\nThe operator send out regular telemetry pings to a central service.\nThis lets us, the secureCodeBox team, get a grasp on how much the secureCodeBox is used.\nThe submitted data is chosen to be as anonymous as possible.\nYou can find a complete report of the data submitted and links to the source-code at: https://www.securecodebox.io/docs/telemetry\nThe first ping is send one hour after the install, you can prevent this by upgrading the chart and setting `telemetryEnabled` to `false`.\n"
3+
raw: |
4+
CHART NAME: minio
5+
CHART VERSION: 13.4.6
6+
APP VERSION: 2024.2.13
7+
8+
** Please be patient while the chart is being deployed **
9+
10+
MinIO® can be accessed via port on the following DNS name from within your cluster:
11+
12+
RELEASE-NAME-minio.NAMESPACE.svc.cluster.local
13+
14+
To get your credentials run:
15+
16+
export ROOT_USER=$(kubectl get secret --namespace NAMESPACE RELEASE-NAME-minio -o jsonpath="{.data.root-user}" | base64 -d)
17+
export ROOT_PASSWORD=$(kubectl get secret --namespace NAMESPACE RELEASE-NAME-minio -o jsonpath="{.data.root-password}" | base64 -d)
18+
19+
To connect to your MinIO® server using a client:
20+
21+
- Run a MinIO® Client pod and append the desired command (e.g. 'admin info'):
22+
23+
kubectl run --namespace NAMESPACE RELEASE-NAME-minio-client \
24+
--rm --tty -i --restart='Never' \
25+
--env MINIO_SERVER_ROOT_USER=$ROOT_USER \
26+
--env MINIO_SERVER_ROOT_PASSWORD=$ROOT_PASSWORD \
27+
--env MINIO_SERVER_HOST=RELEASE-NAME-minio \
28+
--image docker.io/bitnami/minio-client:2024.2.9-debian-11-r7 -- admin info minio
29+
30+
To access the MinIO® web UI:
31+
32+
- Get the MinIO® URL:
33+
34+
echo "MinIO® web URL: http://127.0.0.1:9001/minio"
35+
kubectl port-forward --namespace NAMESPACE svc/RELEASE-NAME-minio 9001:9001
436
2: |
37+
raw: "\nsecureCodeBox Operator Deployed \U0001F680\n\nThe operator can orchestrate the execution of various security scanning tools inside of your cluster.\nYou can find a list of all officially supported scanners here: https://www.securecodebox.io/\nThe website also lists other integrations, like persisting scan results to DefectDojo or Elasticsearch.\n\nThe operator send out regular telemetry pings to a central service.\nThis lets us, the secureCodeBox team, get a grasp on how much the secureCodeBox is used.\nThe submitted data is chosen to be as anonymous as possible.\nYou can find a complete report of the data submitted and links to the source-code at: https://www.securecodebox.io/docs/telemetry\nThe first ping is send one hour after the install, you can prevent this by upgrading the chart and setting `telemetryEnabled` to `false`.\n"
38+
3: |
539
apiVersion: apps/v1
640
kind: Deployment
741
metadata:
@@ -105,7 +139,7 @@ matches the snapshot:
105139
- configMap:
106140
name: foo
107141
name: ca-certificate
108-
3: |
142+
4: |
109143
apiVersion: rbac.authorization.k8s.io/v1
110144
kind: ClusterRole
111145
metadata:
@@ -115,7 +149,7 @@ matches the snapshot:
115149
- /metrics
116150
verbs:
117151
- get
118-
4: |
152+
5: |
119153
apiVersion: rbac.authorization.k8s.io/v1
120154
kind: ClusterRole
121155
metadata:
@@ -133,7 +167,7 @@ matches the snapshot:
133167
- subjectaccessreviews
134168
verbs:
135169
- create
136-
5: |
170+
6: |
137171
apiVersion: rbac.authorization.k8s.io/v1
138172
kind: ClusterRoleBinding
139173
metadata:
@@ -146,7 +180,7 @@ matches the snapshot:
146180
- kind: ServiceAccount
147181
name: securecodebox-operator
148182
namespace: NAMESPACE
149-
6: |
183+
7: |
150184
apiVersion: v1
151185
kind: Service
152186
metadata:
@@ -161,7 +195,7 @@ matches the snapshot:
161195
targetPort: https
162196
selector:
163197
control-plane: controller-manager
164-
7: |
198+
8: |
165199
apiVersion: rbac.authorization.k8s.io/v1
166200
kind: ClusterRole
167201
metadata:
@@ -185,7 +219,7 @@ matches the snapshot:
185219
- cascadingrules/status
186220
verbs:
187221
- get
188-
8: |
222+
9: |
189223
apiVersion: rbac.authorization.k8s.io/v1
190224
kind: ClusterRole
191225
metadata:
@@ -205,7 +239,7 @@ matches the snapshot:
205239
- cascadingrules/status
206240
verbs:
207241
- get
208-
9: |
242+
10: |
209243
apiVersion: rbac.authorization.k8s.io/v1
210244
kind: Role
211245
metadata:
@@ -242,7 +276,7 @@ matches the snapshot:
242276
verbs:
243277
- create
244278
- patch
245-
10: |
279+
11: |
246280
apiVersion: rbac.authorization.k8s.io/v1
247281
kind: RoleBinding
248282
metadata:
@@ -255,7 +289,7 @@ matches the snapshot:
255289
- kind: ServiceAccount
256290
name: securecodebox-operator
257291
namespace: NAMESPACE
258-
11: |
292+
12: |
259293
apiVersion: rbac.authorization.k8s.io/v1
260294
kind: ClusterRole
261295
metadata:
@@ -279,7 +313,7 @@ matches the snapshot:
279313
- parsedefinitions/status
280314
verbs:
281315
- get
282-
12: |
316+
13: |
283317
apiVersion: rbac.authorization.k8s.io/v1
284318
kind: ClusterRole
285319
metadata:
@@ -299,7 +333,7 @@ matches the snapshot:
299333
- parsedefinitions/status
300334
verbs:
301335
- get
302-
13: |
336+
14: |
303337
apiVersion: rbac.authorization.k8s.io/v1
304338
kind: ClusterRole
305339
metadata:
@@ -430,7 +464,7 @@ matches the snapshot:
430464
- get
431465
- list
432466
- watch
433-
14: |
467+
15: |
434468
apiVersion: rbac.authorization.k8s.io/v1
435469
kind: ClusterRoleBinding
436470
metadata:
@@ -443,7 +477,7 @@ matches the snapshot:
443477
- kind: ServiceAccount
444478
name: securecodebox-operator
445479
namespace: NAMESPACE
446-
15: |
480+
16: |
447481
apiVersion: rbac.authorization.k8s.io/v1
448482
kind: ClusterRole
449483
metadata:
@@ -467,7 +501,7 @@ matches the snapshot:
467501
- scans/status
468502
verbs:
469503
- get
470-
16: |
504+
17: |
471505
apiVersion: rbac.authorization.k8s.io/v1
472506
kind: ClusterRole
473507
metadata:
@@ -487,7 +521,7 @@ matches the snapshot:
487521
- scans/status
488522
verbs:
489523
- get
490-
17: |
524+
18: |
491525
apiVersion: rbac.authorization.k8s.io/v1
492526
kind: ClusterRole
493527
metadata:
@@ -511,7 +545,7 @@ matches the snapshot:
511545
- scancompletionhooks/status
512546
verbs:
513547
- get
514-
18: |
548+
19: |
515549
apiVersion: rbac.authorization.k8s.io/v1
516550
kind: ClusterRole
517551
metadata:
@@ -531,7 +565,7 @@ matches the snapshot:
531565
- scancompletionhooks/status
532566
verbs:
533567
- get
534-
19: |
568+
20: |
535569
apiVersion: rbac.authorization.k8s.io/v1
536570
kind: ClusterRole
537571
metadata:
@@ -555,7 +589,7 @@ matches the snapshot:
555589
- scantypes/status
556590
verbs:
557591
- get
558-
20: |
592+
21: |
559593
apiVersion: rbac.authorization.k8s.io/v1
560594
kind: ClusterRole
561595
metadata:
@@ -575,7 +609,7 @@ matches the snapshot:
575609
- scantypes/status
576610
verbs:
577611
- get
578-
21: |
612+
22: |
579613
apiVersion: rbac.authorization.k8s.io/v1
580614
kind: ClusterRole
581615
metadata:
@@ -599,7 +633,7 @@ matches the snapshot:
599633
- scheduledscans/status
600634
verbs:
601635
- get
602-
22: |
636+
23: |
603637
apiVersion: rbac.authorization.k8s.io/v1
604638
kind: ClusterRole
605639
metadata:
@@ -619,7 +653,7 @@ matches the snapshot:
619653
- scheduledscans/status
620654
verbs:
621655
- get
622-
23: |
656+
24: |
623657
apiVersion: v1
624658
kind: ServiceAccount
625659
metadata:

0 commit comments

Comments
 (0)