diff --git a/main.go b/main.go index 7b2b34c..e4d16d9 100644 --- a/main.go +++ b/main.go @@ -56,5 +56,5 @@ func (r *cmdRootFS) Execute(args []string) error { return err } defer out.Close() - return rootfs.Rootfs(in, out) + return rootfs.RootFS(in, out) } diff --git a/rootfs/BUILD b/rootfs/BUILD index 001c807..b9eaa2e 100644 --- a/rootfs/BUILD +++ b/rootfs/BUILD @@ -1,13 +1,16 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "rootfs_lib", - srcs = [ - "rootfs.go", - "rootfs_tests.go", - ], + srcs = ["rootfs.go"], importpath = "github.com/motiejus/code/undocker/rootfs", visibility = ["//visibility:public"], +) + +go_test( + name = "rootfs_test", + srcs = ["rootfs_test.go"], + embed = [":rootfs"], deps = [ "@com_github_stretchr_testify//assert", "@com_github_stretchr_testify//require", diff --git a/rootfs/rootfs_tests.go b/rootfs/rootfs_test.go similarity index 99% rename from rootfs/rootfs_tests.go rename to rootfs/rootfs_test.go index e248cbe..0c01b50 100644 --- a/rootfs/rootfs_tests.go +++ b/rootfs/rootfs_test.go @@ -123,6 +123,8 @@ func TestRootFS(t *testing.T) { }, } + assert.Fail(t, "foo") + for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { in := bytes.NewReader(tt.image.bytes())