Skip to content

Commit 4acbc76

Browse files
author
Patrick Zheng
authored
fix: fix e2e test urls (#1270)
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
1 parent 759cd8c commit 4acbc76

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

test/e2e/suite/command/blob/sign.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ var _ = Describe("notation blob sign", func() {
215215

216216
It("with timestamping and invalid tsa server", func() {
217217
HostWithBlob(BaseOptions(), func(notation *utils.ExecOpts, blobPath string, vhost *utils.VirtualHost) {
218-
notation.ExpectFailure().Exec("blob", "sign", "--timestamp-url", "http://tsa.invalid", "--timestamp-root-cert", filepath.Join(NotationE2EConfigPath, "timestamp", "DigiCertTSARootSHA384.cer"), blobPath).
219-
MatchErrKeyWords("Error: timestamp: Post \"http://tsa.invalid\"")
218+
notation.ExpectFailure().Exec("blob", "sign", "--timestamp-url", "http://localhost.test", "--timestamp-root-cert", filepath.Join(NotationE2EConfigPath, "timestamp", "DigiCertTSARootSHA384.cer"), blobPath).
219+
MatchErrKeyWords("Error: timestamp: Post \"http://localhost.test\"")
220220
})
221221
})
222222

test/e2e/suite/command/sign.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ var _ = Describe("notation sign", func() {
235235

236236
It("with timestamping and invalid tsa server", func() {
237237
Host(BaseOptions(), func(notation *utils.ExecOpts, artifact *Artifact, vhost *utils.VirtualHost) {
238-
notation.ExpectFailure().Exec("sign", "--timestamp-url", "http://tsa.invalid", "--timestamp-root-cert", filepath.Join(NotationE2EConfigPath, "timestamp", "globalsignTSARoot.cer"), artifact.ReferenceWithDigest()).
239-
MatchErrKeyWords("Error: timestamp: Post \"http://tsa.invalid\"")
238+
notation.ExpectFailure().Exec("sign", "--timestamp-url", "http://localhost.test", "--timestamp-root-cert", filepath.Join(NotationE2EConfigPath, "timestamp", "globalsignTSARoot.cer"), artifact.ReferenceWithDigest()).
239+
MatchErrKeyWords("Error: timestamp: Post \"http://localhost.test\"")
240240
})
241241
})
242242

test/e2e/suite/plugin/install.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ var _ = Describe("notation plugin install", func() {
166166

167167
It("with invalid plugin URL scheme", func() {
168168
Host(nil, func(notation *utils.ExecOpts, _ *Artifact, vhost *utils.VirtualHost) {
169-
notation.ExpectFailure().Exec("plugin", "install", "--url", "http://invalid", "--sha256sum", "abcd").
169+
notation.ExpectFailure().Exec("plugin", "install", "--url", "http://localhost", "--sha256sum", "abcd").
170170
MatchErrContent("Error: failed to download plugin from URL: only the HTTPS scheme is supported, but got http\n")
171171
})
172172
})
173173

174174
It("with invalid plugin URL", func() {
175175
Host(nil, func(notation *utils.ExecOpts, _ *Artifact, vhost *utils.VirtualHost) {
176-
notation.ExpectFailure().Exec("plugin", "install", "--url", "https://invalid.test", "--sha256sum", "abcd").
177-
MatchErrKeyWords("failed to download plugin from URL https://invalid.test")
176+
notation.ExpectFailure().Exec("plugin", "install", "--url", "https://localhost.test", "--sha256sum", "abcd").
177+
MatchErrKeyWords("failed to download plugin from URL https://localhost.test")
178178
})
179179
})
180180
})

0 commit comments

Comments
 (0)