Skip to content

Commit 62cd17c

Browse files
committed
fix TestRegistryDockerHelperGetCommand
1 parent 3618343 commit 62cd17c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

internal/namespaces/registry/v1/custom_docker_helper_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bytes"
55
"os"
66
"path"
7+
"regexp"
78
"runtime"
89
"testing"
910

@@ -79,7 +80,12 @@ func TestRegistryDockerHelperGetCommand(t *testing.T) {
7980
Cmd: "scw registry docker-helper get",
8081
Stdin: bytes.NewBufferString("rg.fr-par.scw.cloud\n"),
8182
Check: core.TestCheckCombine(
82-
core.TestCheckGolden(),
83+
core.TestCheckGoldenAndReplacePatterns(
84+
core.GoldenReplacement{
85+
Pattern: regexp.MustCompile(`"Secret":"[0-9a-f-]{36}"`),
86+
Replacement: "11111111-1111-1111-1111-111111111111",
87+
},
88+
),
8389
core.TestCheckExitCode(0),
8490
),
8591
AfterFunc: nil,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
3-
{"Secret":"d1df4522-ff36-4263-94a3-08fef6d9d2db","Username":"scaleway"}🟩🟩🟩 JSON STDOUT 🟩🟩🟩
4-
{"Secret":"d1df4522-ff36-4263-94a3-08fef6d9d2db","Username":"scaleway"}
3+
{11111111-1111-1111-1111-111111111111,"Username":"scaleway"}🟩🟩🟩 JSON STDOUT 🟩🟩🟩
4+
{11111111-1111-1111-1111-111111111111,"Username":"scaleway"}

0 commit comments

Comments
 (0)