|
| 1 | +package node |
| 2 | + |
| 3 | +import ( |
| 4 | + "path/filepath" |
| 5 | + |
| 6 | + g "github.com/onsi/ginkgo/v2" |
| 7 | + compat_otp "github.com/openshift/origin/test/extended/util/compat_otp" |
| 8 | +) |
| 9 | + |
| 10 | +var _ = g.Describe("[sig-node][NodeQE] NODE kubeletconfig feature", func() { |
| 11 | + defer g.GinkgoRecover() |
| 12 | + var oc = compat_otp.NewCLI("node-"+getRandomString(), compat_otp.KubeConfigPath()) |
| 13 | + |
| 14 | + |
| 15 | + g.It("NonHyperShiftHOST-Author:minmli-Medium-39142-kubeletconfig should not prompt duplicate error message", func() { |
| 16 | + buildPruningBaseDir := compat_otp.FixturePath("testdata", "node") |
| 17 | + kubeletConfigT := filepath.Join(buildPruningBaseDir, "kubeletconfig-maxpod.yaml") |
| 18 | + g.By("Test for case OCP-39142") |
| 19 | + |
| 20 | + labelKey := "custom-kubelet-" + getRandomString() |
| 21 | + labelValue := "maxpods-" + getRandomString() |
| 22 | + |
| 23 | + kubeletcfg39142 := kubeletCfgMaxpods{ |
| 24 | + name: "custom-kubelet-39142", |
| 25 | + labelkey: labelKey, |
| 26 | + labelvalue: labelValue, |
| 27 | + maxpods: 239, |
| 28 | + template: kubeletConfigT, |
| 29 | + } |
| 30 | + |
| 31 | + g.By("Create a kubeletconfig without matching machineConfigPool label") |
| 32 | + kubeletcfg39142.createKubeletConfigMaxpods(oc) |
| 33 | + defer kubeletcfg39142.deleteKubeletConfigMaxpods(oc) |
| 34 | + |
| 35 | + g.By("Check kubeletconfig should not prompt duplicate error message") |
| 36 | + keyword := "Error: could not find any MachineConfigPool set for KubeletConfig" |
| 37 | + err := kubeletNotPromptDupErr(oc, keyword, kubeletcfg39142.name) |
| 38 | + compat_otp.AssertWaitPollNoErr(err, "kubeletconfig prompt duplicate error message") |
| 39 | + }) |
| 40 | +}) |
0 commit comments