File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,20 @@ var _ = g.Describe(`[Jira:"Cluster Version Operator"] cluster-version-operator`,
5757 o .Expect (err ).NotTo (o .HaveOccurred (), "Failed to create Kubernetes client" )
5858 })
5959
60+ g .It ("should have a network policy" , g .Label ("OCPBUGS-77762" ), func () {
61+ ctx := context .Background ()
62+ err := util .SkipIfHypershift (ctx , restCfg )
63+ o .Expect (err ).NotTo (o .HaveOccurred (), "Failed to determine if cluster is HyperShift" )
64+ err = util .SkipIfMicroshift (ctx , restCfg )
65+ o .Expect (err ).NotTo (o .HaveOccurred (), "Failed to determine if cluster is MicroShift" )
66+
67+ g .By ("Checking if the default network policy exists on the namespace" )
68+ if _ , err := kubeClient .NetworkingV1 ().NetworkPolicies (external .DefaultCVONamespace ).
69+ Get (ctx , "default-deny" , metav1.GetOptions {}); err != nil {
70+ o .Expect (err ).NotTo (o .HaveOccurred (), "Failed to get the default network policy" )
71+ }
72+ })
73+
6074 // Migrated from case NonHyperShiftHOST-Author:jiajliu-Low-46922-check runlevel and scc in cvo ns
6175 // Refer to https://github.com/openshift/openshift-tests-private/blob/40374cf20946ff03c88712839a5626af2c88ab31/test/extended/ota/cvo/cvo.go#L1081
6276 g .It ("should have correct runlevel and scc" , func () {
You can’t perform that action at this time.
0 commit comments