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
  • Loading branch information
marun authored and damemi committed Dec 6, 2021
1 parent e4d6137 commit 0745c94
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"
"io/ioutil"
"os"
"path"
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 @@ -890,6 +895,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 0745c94

Please sign in to comment.