Skip to content

Commit

Permalink
fix: test formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
shaxbee committed Nov 9, 2020
1 parent 439fea6 commit e6f7362
Showing 1 changed file with 12 additions and 47 deletions.
59 changes: 12 additions & 47 deletions pkg/skaffold/config/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,53 +306,18 @@ func TestIsImageLoadingRequired(t *testing.T) {
cfg *ContextConfig
expected bool
}{
{
cfg: &ContextConfig{Kubecontext: "kind-other"},
expected: true,
},
{

cfg: &ContextConfig{Kubecontext: "kind-other", KindDisableLoad: util.BoolPtr(true)},
expected: false,
},
{
cfg: &ContextConfig{Kubecontext: "kind@kind"},
expected: true,
},
{
cfg: &ContextConfig{Kubecontext: "k3d-k3s-default"},
expected: true,
},
{
cfg: &ContextConfig{Kubecontext: "k3d-k3s-default", K3dDisableLoad: util.BoolPtr(true)},
expected: false,
},
{
cfg: &ContextConfig{Kubecontext: "docker-for-desktop"},
expected: false,
},
{
cfg: &ContextConfig{Kubecontext: "minikube"},
expected: false,
},
{
cfg: &ContextConfig{Kubecontext: "docker-desktop"},
expected: false,
},
{
cfg: &ContextConfig{Kubecontext: "anything-else"},
expected: false},
{
cfg: &ContextConfig{Kubecontext: "kind@blah"},
expected: false},
{
cfg: &ContextConfig{Kubecontext: "other-kind"},
expected: false,
},
{
cfg: &ContextConfig{Kubecontext: "not-k3d"},
expected: false,
},
{cfg: &ContextConfig{Kubecontext: "kind-other"}, expected: true},
{cfg: &ContextConfig{Kubecontext: "kind-other", KindDisableLoad: util.BoolPtr(true)}, expected: false},
{cfg: &ContextConfig{Kubecontext: "kind@kind"}, expected: true},
{cfg: &ContextConfig{Kubecontext: "k3d-k3s-default"}, expected: true},
{cfg: &ContextConfig{Kubecontext: "k3d-k3s-default", K3dDisableLoad: util.BoolPtr(true)}, expected: false},
{cfg: &ContextConfig{Kubecontext: "docker-for-desktop"}, expected: false},
{cfg: &ContextConfig{Kubecontext: "minikube"}, expected: false},
{cfg: &ContextConfig{Kubecontext: "docker-desktop"}, expected: false},
{cfg: &ContextConfig{Kubecontext: "anything-else"}, expected: false},
{cfg: &ContextConfig{Kubecontext: "kind@blah"}, expected: false},
{cfg: &ContextConfig{Kubecontext: "other-kind"}, expected: false},
{cfg: &ContextConfig{Kubecontext: "not-k3d"}, expected: false},
}
for _, test := range tests {
testutil.Run(t, "", func(t *testutil.T) {
Expand Down

0 comments on commit e6f7362

Please sign in to comment.