Skip to content

Commit

Permalink
fix affected cmd/config tests
Browse files Browse the repository at this point in the history
  • Loading branch information
natasha41575 committed Jun 25, 2021
1 parent 066587d commit 06d7d17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
6 changes: 3 additions & 3 deletions cmd/config/internal/commands/cmdwrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ items:
name: test
app: nginx
ports:
# This i the port.
- name: http
# This i the port.
port: 8080
targetPort: 8080
`
Expand Down Expand Up @@ -169,8 +169,8 @@ items:
name: test
app: nginx
ports:
# This i the port.
- name: http
# This i the port.
port: 8080
targetPort: 8080
`
Expand Down Expand Up @@ -269,8 +269,8 @@ items:
name: test
app: nginx
ports:
# This i the port.
- name: http
# This i the port.
port: 8080
targetPort: 8080
`
Expand Down
12 changes: 4 additions & 8 deletions cmd/config/internal/commands/merge3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ spec:
name: app-config
env:
- name: JAVA_OPTS
value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
-Djava.security.egd=file:/dev/./urandom
value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.security.egd=file:/dev/./urandom
imagePullPolicy: Always
minReadySeconds: 5
`), 0600)
Expand Down Expand Up @@ -104,8 +103,7 @@ spec:
name: app-config
env:
- name: JAVA_OPTS
value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
-Djava.security.egd=file:/dev/./urandom
value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.security.egd=file:/dev/./urandom
imagePullPolicy: Always
minReadySeconds: 20
`), 0600)
Expand Down Expand Up @@ -152,8 +150,7 @@ spec:
name: app-config
env:
- name: JAVA_OPTS
value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
-Djava.security.egd=file:/dev/./urandom
value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.security.egd=file:/dev/./urandom
imagePullPolicy: Always
minReadySeconds: 5
`), 0600)
Expand Down Expand Up @@ -201,8 +198,7 @@ spec:
name: app-config
env:
- name: JAVA_OPTS
value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
-Djava.security.egd=file:/dev/./urandom
value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.security.egd=file:/dev/./urandom
imagePullPolicy: Always
minReadySeconds: 20
`), 0600)
Expand Down
13 changes: 3 additions & 10 deletions cmd/config/internal/commands/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,8 @@ func TestSourceCommandJSON(t *testing.T) {
if !assert.Equal(t, `apiVersion: config.kubernetes.io/v1alpha1
kind: ResourceList
items:
- {"kind": "Deployment", "metadata": {"labels": {"app": "nginx2"}, "name": "foo",
"annotations": {"app": "nginx2", config.kubernetes.io/index: '0', config.kubernetes.io/path: 'f1.json'}},
"spec": {"replicas": 1}}
- {"apiVersion": "v1", "kind": "Abstraction", "metadata": {"name": "foo", "annotations": {
"config.kubernetes.io/function": "container:\n image: gcr.io/example/reconciler:v1\n",
"config.kubernetes.io/local-config": "true", config.kubernetes.io/index: '0',
config.kubernetes.io/path: 'f2.json'}}, "spec": {"replicas": 3}}
- {"kind": "Deployment", "metadata": {"labels": {"app": "nginx2"}, "name": "foo", "annotations": {"app": "nginx2", config.kubernetes.io/index: '0', config.kubernetes.io/path: 'f1.json'}}, "spec": {"replicas": 1}}
- {"apiVersion": "v1", "kind": "Abstraction", "metadata": {"name": "foo", "annotations": {"config.kubernetes.io/function": "container:\n image: gcr.io/example/reconciler:v1\n", "config.kubernetes.io/local-config": "true", config.kubernetes.io/index: '0', config.kubernetes.io/path: 'f2.json'}}, "spec": {"replicas": 3}}
`, b.String()) {
return
}
Expand Down Expand Up @@ -307,9 +302,7 @@ func TestSourceCommandJSON_Stdin(t *testing.T) {
if !assert.Equal(t, `apiVersion: config.kubernetes.io/v1alpha1
kind: ResourceList
items:
- {"kind": "Deployment", "metadata": {"labels": {"app": "nginx2"}, "name": "foo",
"annotations": {"app": "nginx2", config.kubernetes.io/index: '0'}}, "spec": {
"replicas": 1}}
- {"kind": "Deployment", "metadata": {"labels": {"app": "nginx2"}, "name": "foo", "annotations": {"app": "nginx2", config.kubernetes.io/index: '0'}}, "spec": {"replicas": 1}}
`, out.String()) {
return
}
Expand Down

0 comments on commit 06d7d17

Please sign in to comment.