Skip to content

Commit

Permalink
refactor: Move testutils to general location (#1459)
Browse files Browse the repository at this point in the history
Signed-off-by: Terry Howe <[email protected]>
  • Loading branch information
Terry Howe authored Aug 3, 2024
1 parent 5d4a835 commit 82949a2
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ LDFLAGS += -X $(PROJECT_PKG)/internal/version.GitTreeState=${GIT_DIRTY}

.PHONY: test
test: tidy vendor check-encoding ## tidy and run tests
$(GO_EXE) test -race -v -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... ./...
$(GO_EXE) test -race -v -coverprofile=coverage.txt -covermode=atomic -coverpkg=$($(GO_EXE) list ./... | grep -v internal/testutils | tr '\n' ',') ./...

.PHONY: teste2e
teste2e: ## run end to end tests
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/internal/display/status/progress/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"

"oras.land/oras/cmd/oras/internal/display/status/console"
"oras.land/oras/cmd/oras/internal/display/status/console/testutils"
"oras.land/oras/internal/testutils"
)

func Test_manager_render(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/internal/display/status/progress/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"oras.land/oras/cmd/oras/internal/display/status/console"
"oras.land/oras/cmd/oras/internal/display/status/console/testutils"
"oras.land/oras/cmd/oras/internal/display/status/progress/humanize"
"oras.land/oras/internal/testutils"
)

func Test_status_String(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/internal/display/status/track/target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"oras.land/oras-go/v2"
"oras.land/oras-go/v2/content/memory"
"oras.land/oras-go/v2/registry/remote"
"oras.land/oras/cmd/oras/internal/display/status/console/testutils"
"oras.land/oras/internal/testutils"
)

type testReferenceGraphTarget struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/internal/display/status/tty_console_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"context"
"oras.land/oras-go/v2"
"oras.land/oras-go/v2/content/memory"
"oras.land/oras/cmd/oras/internal/display/status/console/testutils"
"oras.land/oras/cmd/oras/internal/display/status/track"
"oras.land/oras/internal/testutils"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/internal/option/common_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package option
import (
"testing"

"oras.land/oras/cmd/oras/internal/display/status/console/testutils"
"oras.land/oras/internal/testutils"
)

func TestCommon_parseTTY(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/root/blob/fetch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"oras.land/oras-go/v2/content/memory"
"oras.land/oras/cmd/oras/internal/display/status/console/testutils"
"oras.land/oras/internal/testutils"
)

func Test_fetchBlobOptions_doFetch(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/root/blob/push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"oras.land/oras-go/v2/content/memory"
"oras.land/oras/cmd/oras/internal/display/status/console/testutils"
"oras.land/oras/internal/testutils"
)

func Test_pushBlobOptions_doPush(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/oras/root/cp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"oras.land/oras-go/v2/content/memory"
"oras.land/oras-go/v2/registry/remote"
"oras.land/oras/cmd/oras/internal/display/status/console/testutils"
"oras.land/oras/internal/testutils"
)

var (
Expand Down
File renamed without changes.

0 comments on commit 82949a2

Please sign in to comment.