From fa6118d5c7cbd7c3bbb6cef5e78cd74e680878d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 24 May 2021 00:11:57 +0300 Subject: [PATCH] gazelle? --- main.go | 2 +- rootfs/BUILD | 13 ++++++++----- rootfs/{rootfs_tests.go => rootfs_test.go} | 2 ++ 3 files changed, 11 insertions(+), 6 deletions(-) rename rootfs/{rootfs_tests.go => rootfs_test.go} (99%) 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())