Skip to content

Commit 8bd6fce

Browse files
committed
Add a few unit tests
Signed-off-by: David Gageot <[email protected]>
1 parent d01b706 commit 8bd6fce

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pkg/skaffold/build/local/bazel_test.go

+16
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,19 @@ func TestBazelBin(t *testing.T) {
3636

3737
testutil.CheckErrorAndDeepEqual(t, false, err, "/absolute/path/bin", bazelBin)
3838
}
39+
40+
func TestBuildTarPath(t *testing.T) {
41+
buildTarget := "//:skaffold_example.tar"
42+
43+
tarPath := buildTarPath(buildTarget)
44+
45+
testutil.CheckDeepEqual(t, "skaffold_example.tar", tarPath)
46+
}
47+
48+
func TestBuildImageTag(t *testing.T) {
49+
buildTarget := "//:skaffold_example.tar"
50+
51+
imageTag := buildImageTag(buildTarget)
52+
53+
testutil.CheckDeepEqual(t, ":skaffold_example", imageTag)
54+
}

0 commit comments

Comments
 (0)