You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use server side checking for the deleted manifests
There are some new methods:
1. GetPodsByNamespace() used to get CVO pod
2. ListFilesInPodContainer() used to list files in a pod container, here I use a customized command to reduce files (get file content file takes long time)
3. GetFileContentInPodContainer() used to get file content from a pod container
4. ParseManifest() parse yaml file content to Manifest object.
@@ -109,59 +104,47 @@ var _ = g.Describe(`[Jira:"Cluster Version Operator"] cluster-version-operator`,
109
104
o.Expect(sccAnnotation).To(o.Equal("hostaccess"), "Expected the annotation 'openshift.io/scc annotation' on pod %s to have the value 'hostaccess', but got %s", cvoPod.Name, sccAnnotation)
110
105
})
111
106
112
-
g.It(`should not install resources annotated with release.openshift.io/delete=true`, g.Label("Conformance", "High", "42543", "ConnectedOnly"), func() {
107
+
g.It(`should not install resources annotated with release.openshift.io/delete=true`, g.Label("Conformance", "High", "42543"), func() {
113
108
ctx:=context.Background()
114
109
err:=util.SkipIfHypershift(ctx, restCfg)
115
110
o.Expect(err).NotTo(o.HaveOccurred(), "Failed to determine if cluster is HyperShift")
116
111
err=util.SkipIfMicroshift(ctx, restCfg)
117
112
o.Expect(err).NotTo(o.HaveOccurred(), "Failed to determine if cluster is MicroShift")
returnnil, fmt.Errorf("error executing command in pod %s/%s: %v, stderr: %s", namespace, podName, err, stderrBuf.String())
177
+
}
178
+
files:=strings.Split(stdoutBuf.String(), "\n")
179
+
for_, file:=rangefiles {
180
+
iffile=="" {
181
+
continue
182
+
}
183
+
results=append(results, file)
184
+
}
185
+
returnresults, nil
186
+
}
187
+
188
+
// GetFileContentInPodContainer executes the command to read the content of a file in the specified container of a pod and returns the content as a string.
0 commit comments