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 6, 2024
1 parent aa0749d commit 6e31c41
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package config

import (
"fmt"
"os"
"path"
"reflect"
Expand Down Expand Up @@ -45,7 +44,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 @@ -74,6 +77,7 @@ func Example_view() {
// user:
// token: REDACTED
}
*/

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

func TestSetCurrentContext(t *testing.T) {

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

Expand Down Expand Up @@ -975,6 +980,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 6e31c41

Please sign in to comment.