@@ -327,7 +327,6 @@ func WaitForOpenShiftNamespaceImageStreams(oc *CLI) error {
327327
328328 // Check to see if SamplesOperator managementState is Removed
329329 out , err := oc .AsAdmin ().Run ("get" ).Args ("configs.samples.operator.openshift.io" , "cluster" , "-o" , "yaml" ).Output ()
330-
331330 if err != nil {
332331 e2e .Logf ("\n error on getting samples operator CR: %+v\n %#v\n " , err , out )
333332 }
@@ -781,7 +780,7 @@ func VarSubOnFile(srcFile string, destFile string, vars map[string]string) error
781780 k = "${" + k + "}"
782781 srcString = strings .Replace (srcString , k , v , - 1 ) // -1 means unlimited replacements
783782 }
784- err = ioutil .WriteFile (destFile , []byte (srcString ), 0644 )
783+ err = ioutil .WriteFile (destFile , []byte (srcString ), 0o644 )
785784 }
786785 return err
787786}
@@ -1654,11 +1653,11 @@ func restoreFixtureAsset(dir, name string) error {
16541653 if err != nil {
16551654 return err
16561655 }
1657- err = os .MkdirAll (assetFilePath (dir , filepath .Dir (name )), os .FileMode (0755 ))
1656+ err = os .MkdirAll (assetFilePath (dir , filepath .Dir (name )), os .FileMode (0o755 ))
16581657 if err != nil {
16591658 return err
16601659 }
1661- err = ioutil .WriteFile (assetFilePath (dir , name ), data , 0640 )
1660+ err = ioutil .WriteFile (assetFilePath (dir , name ), data , 0o640 )
16621661 if err != nil {
16631662 return err
16641663 }
@@ -1990,10 +1989,10 @@ type GitRepo struct {
19901989// AddAndCommit commits a file with its content to local repo
19911990func (r GitRepo ) AddAndCommit (file , content string ) error {
19921991 dir := filepath .Dir (file )
1993- if err := os .MkdirAll (filepath .Join (r .RepoPath , dir ), 0777 ); err != nil {
1992+ if err := os .MkdirAll (filepath .Join (r .RepoPath , dir ), 0o777 ); err != nil {
19941993 return err
19951994 }
1996- if err := ioutil .WriteFile (filepath .Join (r .RepoPath , file ), []byte (content ), 0666 ); err != nil {
1995+ if err := ioutil .WriteFile (filepath .Join (r .RepoPath , file ), []byte (content ), 0o666 ); err != nil {
19971996 return err
19981997 }
19991998 if err := r .repo .Add (r .RepoPath , file ); err != nil {
@@ -2347,6 +2346,8 @@ func IsTwoNodeFencing(ctx context.Context, configClient clientconfigv1.Interface
23472346 return infrastructure .Status .ControlPlaneTopology == configv1 .DualReplicaTopologyMode
23482347}
23492348
2349+ var ClusterDegraded bool
2350+
23502351func groupName (groupVersionName string ) string {
23512352 return strings .Split (groupVersionName , "/" )[0 ]
23522353}
0 commit comments