Skip to content

Commit 2c9db3d

Browse files
committed
test: allow local registry test to match on unauthorized or permission denied messages
Signed-off-by: Russell Centanni <[email protected]>
1 parent b678ec6 commit 2c9db3d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

e2e/tests/localregistry/localregistry.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bytes"
55
"context"
66
"fmt"
7+
"io"
78
"os"
89
"time"
910

@@ -409,17 +410,21 @@ var _ = DevSpaceDescribe("localregistry", func() {
409410

410411
// create build command
411412
output := &bytes.Buffer{}
413+
writer := io.MultiWriter(output, os.Stdout)
412414
buildCmd := &cmd.RunPipelineCmd{
413415
GlobalFlags: &flags.GlobalFlags{
414416
NoWarn: true,
415417
},
416418
Pipeline: "build",
417-
Log: logpkg.NewStreamLogger(output, output, logrus.DebugLevel),
419+
Log: logpkg.NewStreamLogger(writer, writer, logrus.DebugLevel),
418420
}
419421
err = buildCmd.RunDefault(f)
420422
framework.ExpectError(err)
421423
gomega.Expect(output.String()).To(
422-
gomega.ContainSubstring("UNAUTHORIZED: authentication required"),
424+
gomega.Or(
425+
gomega.ContainSubstring("unexpected status code 403"),
426+
gomega.ContainSubstring("UNAUTHORIZED: authentication required"),
427+
),
423428
)
424429
})
425430

0 commit comments

Comments
 (0)