Skip to content

Commit

Permalink
Adapting the unit tests to the new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristiyan Gostev committed Jun 13, 2022
1 parent c82f130 commit b39da99
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
Expand Up @@ -78,7 +78,7 @@ var _ = Describe("handler", func() {

validAuditPolicy = `
---
apiVersion: audit.k8s.io/v1beta1
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: RequestResponse
Expand All @@ -92,7 +92,7 @@ rules:
`
anotherValidAuditPolicy = `
---
apiVersion: audit.k8s.io/v1beta1
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: RequestResponse
Expand All @@ -106,7 +106,7 @@ rules:
`
missingKeyAuditPolicy = `
---
apiVersion: audit.k8s.io/v1beta1
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: RequestResponse
Expand All @@ -116,7 +116,7 @@ rules:
`
invalidAuditPolicy = `
---
apiVersion: audit.k8s.io/v1beta1
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: FakeLevel
Expand Down
1 change: 1 addition & 0 deletions pkg/operation/botanist/component/coredns/coredns_test.go
Expand Up @@ -228,6 +228,7 @@ spec:
policyTypes:
- Ingress
- Egress
status: {}
`
deploymentYAMLFor = func(apiserverHost string, podAnnotations map[string]string) string {
out := `apiVersion: apps/v1
Expand Down
Expand Up @@ -49,6 +49,9 @@ conntrack:
min: null
tcpCloseWaitTimeout: null
tcpEstablishedTimeout: null
detectLocal:
bridgeInterface: ""
interfaceNamePrefix: ""
detectLocalMode: ""
enableProfiling: false
healthzBindAddress: ""
Expand Down Expand Up @@ -77,7 +80,9 @@ showHiddenMetricsForVersion: ""
udpIdleTimeout: 0s
winkernel:
enableDSR: false
forwardHealthCheckVip: false
networkName: ""
rootHnsEndpointName: ""
sourceVip: ""
`
)
Expand Down
13 changes: 9 additions & 4 deletions pkg/operation/botanist/component/kubeproxy/kube_proxy_test.go
Expand Up @@ -187,9 +187,9 @@ type: Opaque

configMapNameFor = func(ipvsEnabled bool) string {
if !ipvsEnabled {
return "kube-proxy-config-1212aab2"
return "kube-proxy-config-1c3aa913"
}
return "kube-proxy-config-b9f4a324"
return "kube-proxy-config-ef237614"
}
configMapYAMLFor = func(ipvsEnabled bool) string {
out := `apiVersion: v1
Expand Down Expand Up @@ -218,6 +218,9 @@ data:
min: null
tcpCloseWaitTimeout: null
tcpEstablishedTimeout: null
detectLocal:
bridgeInterface: ""
interfaceNamePrefix: ""
detectLocalMode: ""
enableProfiling: false
featureGates:
Expand Down Expand Up @@ -256,7 +259,9 @@ data:
udpIdleTimeout: 0s
winkernel:
enableDSR: false
forwardHealthCheckVip: false
networkName: ""
rootHnsEndpointName: ""
sourceVip: ""
immutable: true
kind: ConfigMap
Expand Down Expand Up @@ -424,16 +429,16 @@ subjects:

if ipvsEnabled {
annotations = []string{
references.AnnotationKey(references.KindConfigMap, configMapNameFor(ipvsEnabled)) + `: ` + configMapNameFor(ipvsEnabled),
references.AnnotationKey(references.KindConfigMap, configMapConntrackFixScriptName) + `: ` + configMapConntrackFixScriptName,
references.AnnotationKey(references.KindConfigMap, configMapNameFor(ipvsEnabled)) + `: ` + configMapNameFor(ipvsEnabled),
references.AnnotationKey(references.KindConfigMap, configMapCleanupScriptName) + `: ` + configMapCleanupScriptName,
references.AnnotationKey(references.KindSecret, secretName) + `: ` + secretName,
}
} else {
annotations = []string{
references.AnnotationKey(references.KindConfigMap, configMapConntrackFixScriptName) + `: ` + configMapConntrackFixScriptName,
references.AnnotationKey(references.KindConfigMap, configMapCleanupScriptName) + `: ` + configMapCleanupScriptName,
references.AnnotationKey(references.KindConfigMap, configMapNameFor(ipvsEnabled)) + `: ` + configMapNameFor(ipvsEnabled),
references.AnnotationKey(references.KindConfigMap, configMapCleanupScriptName) + `: ` + configMapCleanupScriptName,
references.AnnotationKey(references.KindSecret, secretName) + `: ` + secretName,
}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/operation/botanist/component/vpnshoot/vpnshoot_test.go
Expand Up @@ -166,6 +166,7 @@ spec:
policyTypes:
- Egress
- Ingress
status: {}
`
serviceAccountYAML = `apiVersion: v1
automountServiceAccountToken: false
Expand Down

0 comments on commit b39da99

Please sign in to comment.