Skip to content

Commit

Permalink
Keep securitycontext fields simple in e2e
Browse files Browse the repository at this point in the history
This will make securitycontext fields to be simple and easy in e2e
so that tests can be run on different platform like openshift
where runasUser 65532 and 2000 etc can fail, here we are just checking the
conversion of fields so simple configuration will also
do the job
  • Loading branch information
piyush-garg authored and tekton-robot committed Apr 18, 2023
1 parent 48acab6 commit a3fa523
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
mountPath: /messages
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 2000
runAsNonRoot: true
timeout: 60s
secret:
secretName: test-ssh-credentials
Expand Down Expand Up @@ -110,7 +110,7 @@ spec:
mountPath: /messages
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 2000
runAsNonRoot: true
sidecars:
- name: server
image: alpine/git:v2.26.2
Expand All @@ -133,7 +133,7 @@ spec:
readinessProbe:
periodSeconds: 1
securityContext:
runAsUser: 0
runAsNonRoot: true
volumeMounts:
- name: messages
mountPath: /messages
Expand Down Expand Up @@ -180,7 +180,7 @@ spec:
mountPath: /messages
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 2000
runAsNonRoot: true
timeout: 60s
secret:
secretName: test-ssh-credentials
Expand All @@ -201,7 +201,7 @@ spec:
mountPath: /messages
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 2000
runAsNonRoot: true
sidecars:
- name: server
image: alpine/git:v2.26.2
Expand All @@ -224,7 +224,7 @@ spec:
- name: messages
mountPath: /messages
securityContext:
runAsUser: 0
runAsNonRoot: true
script: echo test
volumes:
- name: messages
Expand Down Expand Up @@ -274,7 +274,7 @@ spec:
timeout: 60s
podTemplate:
securityContext:
fsGroup: 65532
runAsNonRoot: true
workspaces:
- name: password-vault
finally:
Expand Down Expand Up @@ -328,7 +328,7 @@ spec:
timeout: 60s
podTemplate:
securityContext:
fsGroup: 65532
runAsNonRoot: true
workspaces:
- name: password-vault
finally:
Expand Down Expand Up @@ -375,7 +375,7 @@ spec:
emptyDir: {}
podTemplate:
securityContext:
fsGroup: 65532
allowPrivilegeEscalation: false
`

v1beta1TaskRunExpectedYaml = `
Expand All @@ -392,7 +392,7 @@ spec:
timeout: 60s
podTemplate:
securityContext:
fsGroup: 65532
allowPrivilegeEscalation: false
taskSpec:
steps:
- computeResources: {}
Expand Down Expand Up @@ -444,7 +444,7 @@ spec:
timeout: 60s
podTemplate:
securityContext:
fsGroup: 65532
allowPrivilegeEscalation: false
workspaces:
- emptyDir: {}
name: output
Expand Down Expand Up @@ -474,7 +474,7 @@ spec:
timeout: 60s
podTemplate:
securityContext:
fsGroup: 65532
allowPrivilegeEscalation: false
workspaces:
- emptyDir: {}
name: output
Expand Down

0 comments on commit a3fa523

Please sign in to comment.