From c5a9f5761466fe507999ed7a2ec099481d894966 Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Sun, 27 Apr 2025 09:50:19 +0800 Subject: [PATCH 1/4] fix e2e test Signed-off-by: Patrick Zheng --- internal/version/version.go | 2 +- test/e2e/suite/command/sign.go | 4 ++-- test/e2e/suite/plugin/install.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/version/version.go b/internal/version/version.go index d229a41ca..c8213e623 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -15,7 +15,7 @@ package version var ( // Version shows the current notation version, optionally with pre-release. - Version = "v1.3.2" + Version = "v1.3.1" // BuildMetadata stores the build metadata. // diff --git a/test/e2e/suite/command/sign.go b/test/e2e/suite/command/sign.go index 334e27e25..167a27b5a 100644 --- a/test/e2e/suite/command/sign.go +++ b/test/e2e/suite/command/sign.go @@ -296,8 +296,8 @@ var _ = Describe("notation sign", func() { It("with timestamping and invalid tsa server", func() { Host(BaseOptions(), func(notation *utils.ExecOpts, artifact *Artifact, vhost *utils.VirtualHost) { - notation.ExpectFailure().Exec("sign", "--timestamp-url", "http://invalid.com", "--timestamp-root-cert", filepath.Join(NotationE2EConfigPath, "timestamp", "globalsignTSARoot.cer"), artifact.ReferenceWithDigest()). - MatchErrKeyWords("Error: timestamp: Post \"http://invalid.com\""). + notation.ExpectFailure().Exec("sign", "--timestamp-url", "http://localhost.test", "--timestamp-root-cert", filepath.Join(NotationE2EConfigPath, "timestamp", "globalsignTSARoot.cer"), artifact.ReferenceWithDigest()). + MatchErrKeyWords("Error: timestamp: Post \"http://localhost.test\""). MatchErrKeyWords("server misbehaving") }) }) diff --git a/test/e2e/suite/plugin/install.go b/test/e2e/suite/plugin/install.go index 66e828522..6ac7728d5 100644 --- a/test/e2e/suite/plugin/install.go +++ b/test/e2e/suite/plugin/install.go @@ -166,15 +166,15 @@ var _ = Describe("notation plugin install", func() { It("with invalid plugin URL scheme", func() { Host(nil, func(notation *utils.ExecOpts, _ *Artifact, vhost *utils.VirtualHost) { - notation.ExpectFailure().Exec("plugin", "install", "--url", "http://invalid", "--sha256sum", "abcd"). + notation.ExpectFailure().Exec("plugin", "install", "--url", "http://localhost", "--sha256sum", "abcd"). MatchErrContent("Error: failed to download plugin from URL: only the HTTPS scheme is supported, but got http\n") }) }) It("with invalid plugin URL", func() { Host(nil, func(notation *utils.ExecOpts, _ *Artifact, vhost *utils.VirtualHost) { - notation.ExpectFailure().Exec("plugin", "install", "--url", "https://invalid.test", "--sha256sum", "abcd"). - MatchErrKeyWords("failed to download plugin from URL https://invalid.test") + notation.ExpectFailure().Exec("plugin", "install", "--url", "https://localhost.test", "--sha256sum", "abcd"). + MatchErrKeyWords("failed to download plugin from URL https://localhost.test") }) }) }) From 1d90d902047b109599d7d3eee0861c12378ee278 Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Sun, 27 Apr 2025 09:54:50 +0800 Subject: [PATCH 2/4] fix e2e test Signed-off-by: Patrick Zheng --- test/e2e/suite/command/sign.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/suite/command/sign.go b/test/e2e/suite/command/sign.go index 167a27b5a..6d3bc7370 100644 --- a/test/e2e/suite/command/sign.go +++ b/test/e2e/suite/command/sign.go @@ -298,7 +298,7 @@ var _ = Describe("notation sign", func() { Host(BaseOptions(), func(notation *utils.ExecOpts, artifact *Artifact, vhost *utils.VirtualHost) { notation.ExpectFailure().Exec("sign", "--timestamp-url", "http://localhost.test", "--timestamp-root-cert", filepath.Join(NotationE2EConfigPath, "timestamp", "globalsignTSARoot.cer"), artifact.ReferenceWithDigest()). MatchErrKeyWords("Error: timestamp: Post \"http://localhost.test\""). - MatchErrKeyWords("server misbehaving") + MatchErrKeyWords("no such host") }) }) From 967e1e4e7b71d353265d41db25084731d97d9fc5 Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Sun, 27 Apr 2025 10:07:09 +0800 Subject: [PATCH 3/4] fix e2e test urls Signed-off-by: Patrick Zheng --- test/e2e/suite/command/sign.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/suite/command/sign.go b/test/e2e/suite/command/sign.go index 6d3bc7370..b4ad6fe80 100644 --- a/test/e2e/suite/command/sign.go +++ b/test/e2e/suite/command/sign.go @@ -297,8 +297,7 @@ var _ = Describe("notation sign", func() { It("with timestamping and invalid tsa server", func() { Host(BaseOptions(), func(notation *utils.ExecOpts, artifact *Artifact, vhost *utils.VirtualHost) { notation.ExpectFailure().Exec("sign", "--timestamp-url", "http://localhost.test", "--timestamp-root-cert", filepath.Join(NotationE2EConfigPath, "timestamp", "globalsignTSARoot.cer"), artifact.ReferenceWithDigest()). - MatchErrKeyWords("Error: timestamp: Post \"http://localhost.test\""). - MatchErrKeyWords("no such host") + MatchErrKeyWords("Error: timestamp: Post \"http://localhost.test\"") }) }) From 04806e1cd2392cfaff6090b48162ad36d2a84259 Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Sun, 27 Apr 2025 11:05:26 +0800 Subject: [PATCH 4/4] update Signed-off-by: Patrick Zheng --- internal/version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/version/version.go b/internal/version/version.go index c8213e623..d229a41ca 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -15,7 +15,7 @@ package version var ( // Version shows the current notation version, optionally with pre-release. - Version = "v1.3.1" + Version = "v1.3.2" // BuildMetadata stores the build metadata. //