Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAST test update steps 2411 #21

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions tests/dast/rapid-lca/03-rapidast-job.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand Down Expand Up @@ -36,17 +35,15 @@ spec:
- command:
- sh
- -c
- rapidast.py --log-level debug --config
/helm/config/rapidastconfig.yaml && find /opt/rapidast/results/lca
-name zap-report.json -exec cat {} \;
- rapidast.py --log-level debug --config /helm/config/rapidastconfig.yaml && find /opt/rapidast/results/ -name zap-report.json -exec cat {} \;
image: quay.io/redhatproductsecurity/rapidast:latest
imagePullPolicy: Always
name: rapidast-chart
resources: {}
securityContext:
privileged: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /helm/config
name: config-volume
Expand All @@ -62,5 +59,5 @@ spec:
name: rapidast-configmap
name: config-volume
- name: results-volume
persistentVolumeClaim: null
claimName: rapidast-pvc
persistentVolumeClaim:
claimName: rapidast-pvc
2 changes: 1 addition & 1 deletion tests/dast/rapid-lca/04-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 180
commands:
- script: ./tests/e2e-rh-sdl/rapidast-lca/results.sh
- script: ./tests/dast/rapidast-lca/results.sh
26 changes: 13 additions & 13 deletions tests/dast/rapid-lca/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,38 @@ metadata:
name: rapidast-lca
spec:
steps:
- name: step-00
try:
- name: step-00
try:
- apply:
file: 00-create-project.yaml
- assert:
file: 00-assert.yaml
- name: step-01
try:
- name: step-01
try:
- apply:
file: 01-create-sa.yaml
- assert:
file: 01-assert.yaml
- name: step-02
try:
- name: step-02
try:
- script:
timeout: 30s
content: ./create_rapidast_configmap.sh
- assert:
file: 02-assert.yaml
- name: step-03
try:
- name: step-03
try:
- apply:
file: 03-rapidast-job.yaml
- assert:
file: 03-assert.yaml
- name: step-04
try:
- name: step-04
try:
- script:
timeout: 6m
content: ./results.sh
finally:
- command:
finally:
- command:
timeout: 1m
entrypoint: oc
args:
Expand All @@ -45,7 +45,7 @@ spec:
- delete
- pod
- rapiterm-lca
- command:
- command:
timeout: 1m
entrypoint: oc
args:
Expand Down
8 changes: 0 additions & 8 deletions tests/dast/rapid-lca/oobt_test_data/cr_example.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions tests/dast/rapid-lca/oobt_test_data/v5-none-oobt-template.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions tests/dast/rapid-lca/test_oobt.py

This file was deleted.

8 changes: 3 additions & 5 deletions tests/dast/rapid-nrop/03-rapidast-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ spec:
- command:
- sh
- -c
- rapidast.py --log-level debug --config
/helm/config/rapidastconfig.yaml && find /opt/rapidast/results/nrop
-name zap-report.json -exec cat {} \;
- rapidast.py --log-level debug --config /helm/config/rapidastconfig.yaml && find /opt/rapidast/results/nrop -name zap-report.json -exec cat {} \;
image: quay.io/redhatproductsecurity/rapidast:latest
imagePullPolicy: Always
name: rapidast-chart
Expand All @@ -62,5 +60,5 @@ spec:
name: rapidast-configmap
name: config-volume
- name: results-volume
persistentVolumeClaim: null
claimName: rapidast-pvc
persistentVolumeClaim:
claimName: rapidast-pvc
2 changes: 1 addition & 1 deletion tests/dast/rapid-nrop/04-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 180
commands:
- script: ./tests/e2e-rh-sdl/rapidast-nrop/results.sh
- script: ./tests/dast/rapidast-nrop/results.sh
26 changes: 13 additions & 13 deletions tests/dast/rapid-nrop/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,38 @@ metadata:
name: rapidast-nrop
spec:
steps:
- name: step-00
try:
- name: step-00
try:
- apply:
file: 00-create-project.yaml
- assert:
file: 00-assert.yaml
- name: step-01
try:
- name: step-01
try:
- apply:
file: 01-create-sa.yaml
- assert:
file: 01-assert.yaml
- name: step-02
try:
- name: step-02
try:
- script:
timeout: 30s
content: ./create_rapidast_configmap.sh
- assert:
file: 02-assert.yaml
- name: step-03
try:
- name: step-03
try:
- apply:
file: 03-rapidast-job.yaml
- assert:
file: 03-assert.yaml
- name: step-04
try:
- name: step-04
try:
- script:
timeout: 6m
content: ./results.sh
finally:
- command:
finally:
- command:
timeout: 1m
entrypoint: oc
args:
Expand All @@ -45,7 +45,7 @@ spec:
- delete
- pod
- rapiterm-nrop
- command:
- command:
timeout: 1m
entrypoint: oc
args:
Expand Down
2 changes: 1 addition & 1 deletion tests/dast/rapid-nrop/create_rapidast_configmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data:
zap:
apiScan:
apis:
apiUrl: "https://kubernetes.default.svc/openapi/v3/apis/nrop.openshift.io/v1alpha1"
apiUrl: "https://kubernetes.default.svc/openapi/v3/apis/nodetopology.openshift.io/v1alpha1"
passiveScan:
disabledRules: "2,10015,10027,10096,10024,10054"
activeScan:
Expand Down
8 changes: 3 additions & 5 deletions tests/dast/rapid-ptp/03-rapidast-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ spec:
- command:
- sh
- -c
- rapidast.py --log-level debug --config
/helm/config/rapidastconfig.yaml && find /opt/rapidast/results/ptp
-name zap-report.json -exec cat {} \;
- rapidast.py --log-level debug --config /helm/config/rapidastconfig.yaml && find /opt/rapidast/results/ptp -name zap-report.json -exec cat {} \;
image: quay.io/redhatproductsecurity/rapidast:latest
imagePullPolicy: Always
name: rapidast-chart
Expand All @@ -62,5 +60,5 @@ spec:
name: rapidast-configmap
name: config-volume
- name: results-volume
persistentVolumeClaim: null
claimName: rapidast-pvc
persistentVolumeClaim:
claimName: rapidast-pvc
2 changes: 1 addition & 1 deletion tests/dast/rapid-ptp/04-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 180
commands:
- script: ./tests/e2e-rh-sdl/rapidast-ptp/results.sh
- script: ./tests/dast/rapidast-ptp/results.sh
22 changes: 11 additions & 11 deletions tests/dast/rapid-ptp/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ metadata:
name: rapidast-ptp
spec:
steps:
- name: step-00
try:
- name: step-00
try:
- apply:
file: 00-create-project.yaml
- assert:
file: 00-assert.yaml
- name: step-01
try:
- name: step-01
try:
- apply:
file: 01-create-sa.yaml
- assert:
file: 01-assert.yaml
- name: step-02
try:
- name: step-02
try:
- script:
timeout: 30s
content: ./create_rapidast_configmap.sh
- assert:
file: 02-assert.yaml
- name: step-03
try:
- name: step-03
try:
- apply:
file: 03-rapidast-job.yaml
- assert:
Expand All @@ -35,8 +35,8 @@ spec:
- script:
timeout: 6m
content: ./results.sh
finally:
- command:
finally:
- command:
timeout: 1m
entrypoint: oc
args:
Expand All @@ -45,7 +45,7 @@ spec:
- delete
- pod
- rapiterm-ptp
- command:
- command:
timeout: 1m
entrypoint: oc
args:
Expand Down
2 changes: 1 addition & 1 deletion tests/dast/rapid-ptp/create_rapidast_configmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data:
zap:
apiScan:
apis:
apiUrl: "https://kubernetes.default.svc/openapi/v3/apis/ptp.openshift.io/v1alpha1"
apiUrl: "https://kubernetes.default.svc/openapi/v3/apis/ptp.openshift.io/v1"
passiveScan:
disabledRules: "2,10015,10027,10096,10024,10054"
activeScan:
Expand Down
8 changes: 3 additions & 5 deletions tests/dast/rapid-talm/03-rapidast-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ spec:
- command:
- sh
- -c
- rapidast.py --log-level debug --config
/helm/config/rapidastconfig.yaml && find /opt/rapidast/results/talm
-name zap-report.json -exec cat {} \;
- rapidast.py --log-level debug --config /helm/config/rapidastconfig.yaml && find /opt/rapidast/results/talm -name zap-report.json -exec cat {} \;
image: quay.io/redhatproductsecurity/rapidast:latest
imagePullPolicy: Always
name: rapidast-chart
Expand All @@ -62,5 +60,5 @@ spec:
name: rapidast-configmap
name: config-volume
- name: results-volume
persistentVolumeClaim: null
claimName: rapidast-pvc
persistentVolumeClaim:
claimName: rapidast-pvc
2 changes: 1 addition & 1 deletion tests/dast/rapid-talm/04-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 180
commands:
- script: ./tests/e2e-rh-sdl/rapidast-talm/results.sh
- script: ./tests/dast/rapidast-talm/results.sh
Loading