Skip to content

Commit

Permalink
Add a few unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: David Gageot <david@gageot.net>
  • Loading branch information
dgageot committed Nov 30, 2018
1 parent 5a519d3 commit 1bdf3df
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/skaffold/build/local/bazel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,19 @@ func TestBazelBin(t *testing.T) {

testutil.CheckErrorAndDeepEqual(t, false, err, "/absolute/path/bin", bazelBin)
}

func TestBuildTarPath(t *testing.T) {
buildTarget := "//:skaffold_example.tar"

tarPath := buildTarPath(buildTarget)

testutil.CheckDeepEqual(t, "skaffold_example.tar", tarPath)
}

func TestBuildImageTag(t *testing.T) {
buildTarget := "//:skaffold_example.tar"

imageTag := buildImageTag(buildTarget)

testutil.CheckDeepEqual(t, ":skaffold_example", imageTag)
}

0 comments on commit 1bdf3df

Please sign in to comment.