Skip to content

Commit

Permalink
minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
briandealwis committed Jan 5, 2021
1 parent e028228 commit 322fb32
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions pkg/skaffold/initializer/build/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type InitBuilder interface {
Describe() string

// ArtifactType returns the type of the artifact to be built. Paths should be relative to the workspace.
// To make skaffold.yaml more portable across OS-es we should always generate /-delimited filepaths.
ArtifactType(workspace string) latest.ArtifactType

// ConfiguredImage returns the target image configured by the builder, or an empty string if no image is configured.
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/initializer/build/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func Artifacts(artifactInfos []ArtifactInfo) []*latest.Artifact {
}

if workspace != "." {
// to make skaffold.yaml more portable across OS-es we should always generate /-delimited filePaths
// to make skaffold.yaml more portable across OS-es we should always generate /-delimited filepaths
artifact.Workspace = filepath.ToSlash(workspace)
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/skaffold/initializer/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
func TestDoInit(t *testing.T) {
tests := []struct {
name string
shouldSkip func() bool
shouldSkip bool
dir string
config initconfig.Config
expectedError string
Expand Down Expand Up @@ -93,7 +93,7 @@ func TestDoInit(t *testing.T) {
},
{
name: "windows paths use forward slashes",
shouldSkip: func() bool { return runtime.GOOS != "windows" },
shouldSkip: runtime.GOOS != "windows",
dir: `testdata\init\windows`,
config: initconfig.Config{
Force: true,
Expand Down Expand Up @@ -228,7 +228,7 @@ See https://skaffold.dev/docs/pipeline-stages/deployers/helm/ for a detailed gui
}
for _, test := range tests {
testutil.Run(t, test.name, func(t *testutil.T) {
if test.shouldSkip != nil && test.shouldSkip() {
if test.shouldSkip {
t.Logf("Skipped test %q", test.name)
return
}
Expand Down

0 comments on commit 322fb32

Please sign in to comment.