From a1d076409970ad5e0c02a63e927bd18e2ce51420 Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Tue, 18 Jul 2023 20:52:31 +0800 Subject: [PATCH] fix: correct e2e specs and CI check configuration (#1023) Signed-off-by: Billy Zha --- Makefile | 3 +-- test/e2e/suite/command/attach.go | 2 +- test/e2e/suite/command/cp.go | 2 +- test/e2e/suite/command/manifest.go | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index cbf8181c4..df548f223 100644 --- a/Makefile +++ b/Makefile @@ -134,8 +134,7 @@ teste2e-covdata: ## test e2e coverage export GOCOVERDIR=$(CURDIR)/test/e2e/.cover; \ rm -rf $$GOCOVERDIR; \ mkdir -p $$GOCOVERDIR; \ - $(MAKE) teste2e; \ - $(GO_EXE) tool covdata textfmt -i=$$GOCOVERDIR -o "$(CURDIR)/test/e2e/coverage.txt" + $(MAKE) teste2e && $(GO_EXE) tool covdata textfmt -i=$$GOCOVERDIR -o "$(CURDIR)/test/e2e/coverage.txt" .PHONY: help help: ## Display this help diff --git a/test/e2e/suite/command/attach.go b/test/e2e/suite/command/attach.go index 499a613da..883ab2fed 100644 --- a/test/e2e/suite/command/attach.go +++ b/test/e2e/suite/command/attach.go @@ -293,7 +293,7 @@ var _ = Describe("OCI image layout users:", func() { root := PrepareTempFiles() subjectRef := LayoutRef(root, foobar.Tag) prepare(root) - ORAS("attach", "--artifact-type", "test.attach", "-v", Flags.Layout, subjectRef, fmt.Sprintf("%s:%s", foobar.AttachFileName, foobar.AttachFileMedia)). + ORAS("attach", "--artifact-type", "test.attach", "-v", Flags.Layout, subjectRef, fmt.Sprintf("%s:%s", foobar.AttachFileName, foobar.AttachFileMedia), "--skip-delete-referrers"). MatchErrKeyWords("referrers deletion can only be enforced upon registry\n"). WithWorkDir(root). Exec() diff --git a/test/e2e/suite/command/cp.go b/test/e2e/suite/command/cp.go index 5865ba0cb..3064c9977 100644 --- a/test/e2e/suite/command/cp.go +++ b/test/e2e/suite/command/cp.go @@ -364,7 +364,7 @@ var _ = Describe("OCI layout users:", func() { }) It("should copy and output verbosed warning for Feferrers deletion by default", func() { - ORAS("cp", RegistryRef(Host, ArtifactRepo, foobar.Tag), GinkgoT().TempDir(), Flags.ToLayout, "-v"). + ORAS("cp", RegistryRef(Host, ArtifactRepo, foobar.Tag), GinkgoT().TempDir(), Flags.ToLayout, "-v", "--skip-delete-referrers"). MatchErrKeyWords("referrers deletion can only be enforced upon registry\n"). Exec() }) diff --git a/test/e2e/suite/command/manifest.go b/test/e2e/suite/command/manifest.go index 36d30bf0c..51235314e 100644 --- a/test/e2e/suite/command/manifest.go +++ b/test/e2e/suite/command/manifest.go @@ -549,7 +549,7 @@ var _ = Describe("OCI image layout users:", func() { manifestPath := WriteTempFile("manifest.json", manifest) root := filepath.Dir(manifestPath) prepare(root) - ORAS("manifest", "push", root, Flags.Layout, manifestPath, "--skip-delete-referrers=false"). + ORAS("manifest", "push", root, Flags.Layout, manifestPath, "--skip-delete-referrers"). WithWorkDir(root). MatchErrKeyWords("referrers deletion can only be enforced upon registry\n").Exec() })