Skip to content

Commit

Permalink
UPSTREAM: <carry>: Skip unit tests incompatible with openshift ci
Browse files Browse the repository at this point in the history
OpenShift-Rebase-Source: e1e2042
  • Loading branch information
marun authored and bertinatto committed Mar 27, 2023
1 parent 7d5f327 commit d481639
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion staging/src/k8s.io/kubectl/pkg/cmd/config/config_test.go
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package config

import (
"fmt"
"os"
"path"
"reflect"
Expand All @@ -44,7 +43,11 @@ func newRedFederalCowHammerConfig() clientcmdapi.Config {
}
}

// It's not worth making this test compatible given that kubectl/oc is
// maintained in a separate branch of openshift/kubernetes.
/*
func Example_view() {
expectedConfig := newRedFederalCowHammerConfig()
test := configCommandTest{
args: []string{"view"},
Expand Down Expand Up @@ -73,6 +76,7 @@ func Example_view() {
// user:
// token: REDACTED
}
*/

func TestCurrentContext(t *testing.T) {
startingConfig := newRedFederalCowHammerConfig()
Expand All @@ -86,6 +90,7 @@ func TestCurrentContext(t *testing.T) {
}

func TestSetCurrentContext(t *testing.T) {

expectedConfig := newRedFederalCowHammerConfig()
startingConfig := newRedFederalCowHammerConfig()

Expand Down Expand Up @@ -889,6 +894,11 @@ func (test configCommandTest) checkOutput(out string, expectedOutputs []string,
}

func (test configCommandTest) run(t *testing.T) string {
// It's not worth making these tests compatible given that
// kubectl/oc is maintained in a separate branch of
// openshift/kubernetes.
t.Skip("Not compatible with openshift ci")

out, actualConfig := testConfigCommand(test.args, test.startingConfig, t)

testSetNilMapsToEmpties(reflect.ValueOf(&test.expectedConfig))
Expand Down

0 comments on commit d481639

Please sign in to comment.