Skip to content

Commit

Permalink
chore: upgrade dependencies (#8431)
Browse files Browse the repository at this point in the history
* fix dependency confilicts and fix tests

* chore: fix tests

* chore: fix tests and lint issues

* chore: fix ko test and lint issues
  • Loading branch information
ericzzzzzzz authored Feb 14, 2023
1 parent 4c9c341 commit e1bd270
Show file tree
Hide file tree
Showing 46 changed files with 1,592 additions and 2,495 deletions.
12 changes: 6 additions & 6 deletions cmd/skaffold/app/cmd/config/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ default-repo: value
multi-level-repo: true
local-cluster: true
insecure-registries:
- bad.io
- worse.io
- bad.io
- worse.io
`,
},
{
Expand All @@ -90,7 +90,7 @@ insecure-registries:
multi-level-repo: true
local-cluster: true
insecure-registries:
- mediocre.io
- mediocre.io
`,
},
{
Expand All @@ -116,10 +116,10 @@ global:
multi-level-repo: true
local-cluster: true
insecure-registries:
- mediocre.io
- mediocre.io
kubeContexts:
- kube-context: this_is_a_context
default-repo: value
- kube-context: this_is_a_context
default-repo: value
`,
},
{
Expand Down
2 changes: 1 addition & 1 deletion cmd/skaffold/app/cmd/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
var b bytes.Buffer
err := runFilter(context.TODO(), &b, false, test.buildArtifacts)
t.CheckNoError(err)
t.CheckDeepEqual(test.expected, b.String())
t.CheckDeepEqual(test.expected, b.String(), testutil.YamlObj(t.T))
})
}
}
11 changes: 8 additions & 3 deletions cmd/skaffold/app/cmd/fix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"os"
"testing"

"github.com/google/go-cmp/cmp"

"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/latest"
v1 "github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/v1"
"github.com/GoogleContainerTools/skaffold/v2/testutil"
Expand All @@ -34,10 +36,12 @@ func TestFix(t *testing.T) {
targetVersion string
output string
shouldErr bool
cmpOptions cmp.Options
}{
{
description: "v1alpha4 to latest",
targetVersion: latest.Version,
cmpOptions: []cmp.Option{testutil.YamlObj(t)},
inputYaml: `apiVersion: skaffold/v1alpha4
kind: Config
build:
Expand Down Expand Up @@ -75,6 +79,7 @@ deploy:
{
description: "v1alpha1 to latest",
targetVersion: latest.Version,
cmpOptions: []cmp.Option{testutil.YamlObj(t)},
inputYaml: `apiVersion: skaffold/v1alpha1
kind: Config
build:
Expand Down Expand Up @@ -104,6 +109,7 @@ deploy:
{
description: "v1alpha1 to v1",
targetVersion: v1.Version,
cmpOptions: []cmp.Option{testutil.YamlObj(t)},
inputYaml: `apiVersion: skaffold/v1alpha1
kind: Config
build:
Expand Down Expand Up @@ -161,8 +167,7 @@ build:

var b bytes.Buffer
err := fix(&b, cfgFile, "", test.targetVersion)

t.CheckErrorAndDeepEqual(test.shouldErr, err, test.output, b.String())
t.CheckErrorAndDeepEqual(test.shouldErr, err, test.output, b.String(), test.cmpOptions)
})
}
}
Expand Down Expand Up @@ -211,6 +216,6 @@ deploy:
output, _ := os.ReadFile(cfgFile)

t.CheckNoError(err)
t.CheckDeepEqual(expectedOutput, string(output))
t.CheckDeepEqual(expectedOutput, string(output), testutil.YamlObj(t.T))
})
}
Loading

0 comments on commit e1bd270

Please sign in to comment.