Skip to content

Commit 6c27f27

Browse files
author
Niranjan M.R
committed
Separate Kubelet config and kubelet arguments assertion
Signed-off-by: Niranjan M.R <[email protected]>
1 parent 6aba0c5 commit 6c27f27

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

functests/2_performance_update/kubelet.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,15 @@ var _ = Describe("[ref_id: 45487][performance]additional kubelet arguments", fun
7171
Expect(kubeletSliceValues(sysctlsValue, "net.core.somaxconn")).To(BeTrue())
7272
Expect(kubeletSliceValues(sysctlsValue, "kernel.msg*")).To(BeTrue())
7373
Expect(kubeletConfig.KubeReserved["memory"]).To(Equal("768Mi"))
74+
Expect(kubeletConfig.ImageMinimumGCAge.Seconds()).To(Equal(180))
75+
}
76+
for _, node := range workerRTNodes {
7477
stdout, err := nodes.ExecCommandOnNode(kubeletArguments, &node)
7578
Expect(err).ToNot(HaveOccurred())
7679
Expect(strings.Contains(stdout, "300Mi")).To(BeTrue())
77-
Expect(kubeletConfig.ImageMinimumGCAge.Seconds()).To(Equal(180))
7880
}
7981
})
80-
when("Setting cpu manager related parameters", func() {
82+
Context("When setting cpu manager related parameters", func() {
8183
It("[test_id:45493]Should not override performance-addon-operator values", func() {
8284
cpuManagerAnnotation := map[string]string{
8385
"kubeletconfig.experimental": "{\"cpuManagerPolicy\":\"static\",\"cpuManagerReconcilePeriod\":\"5s\"}",
@@ -156,11 +158,13 @@ var _ = Describe("[ref_id: 45487][performance]additional kubelet arguments", fun
156158
Expect(err).ToNot(HaveOccurred())
157159
Expect(kubeletConfig.AllowedUnsafeSysctls).To(Equal(nil))
158160
Expect(kubeletConfig.KubeReserved["memory"]).ToNot(Equal("768Mi"))
159-
stdout, err := nodes.ExecCommandOnNode(kubeletArguments, &node)
160-
Expect(err).ToNot(HaveOccurred())
161-
Expect(strings.Contains(stdout, "300Mi")).ToNot(BeTrue())
162161
Expect(kubeletConfig.ImageMinimumGCAge.Seconds()).ToNot(Equal(180))
163162
}
163+
for _, node := range workerRTNodes {
164+
stdout, err := nodes.ExecCommandOnNode(kubeletArguments, &node)
165+
Expect(err).ToNot(HaveOccurred())
166+
Expect(strings.Contains(stdout, "300Mi")).To(BeTrue())
167+
}
164168

165169
})
166170

0 commit comments

Comments
 (0)