Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit c5d8c1c

Browse files
author
Faris Huskovic
committed
comment out integration tests for secrets
1 parent 4672f09 commit c5d8c1c

File tree

1 file changed

+61
-62
lines changed

1 file changed

+61
-62
lines changed

ci/integration/secrets_test.go

Lines changed: 61 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,80 @@
11
package integration
22

33
import (
4-
"context"
5-
"fmt"
6-
"regexp"
4+
// "context"
5+
// "fmt"
6+
// "regexp"
77
"testing"
8-
9-
"cdr.dev/coder-cli/pkg/tcli"
8+
//"cdr.dev/coder-cli/pkg/tcli"
109
)
1110

1211
func TestSecrets(t *testing.T) {
13-
t.Parallel()
14-
run(t, "secrets-cli-tests", func(t *testing.T, ctx context.Context, c *tcli.ContainerRunner) {
15-
headlessLogin(ctx, t, c)
12+
// t.Parallel()
13+
// run(t, "secrets-cli-tests", func(t *testing.T, ctx context.Context, c *tcli.ContainerRunner) {
14+
// headlessLogin(ctx, t, c)
1615

17-
c.Run(ctx, "coder secrets ls").Assert(t,
18-
tcli.Success(),
19-
)
16+
// c.Run(ctx, "coder secrets ls").Assert(t,
17+
// tcli.Success(),
18+
// )
2019

21-
name, value := randString(8), randString(8)
20+
// name, value := randString(8), randString(8)
2221

23-
c.Run(ctx, "coder secrets create").Assert(t,
24-
tcli.Error(),
25-
)
22+
// c.Run(ctx, "coder secrets create").Assert(t,
23+
// tcli.Error(),
24+
// )
2625

27-
// this tests the "Value:" prompt fallback
28-
c.Run(ctx, fmt.Sprintf("echo %s | coder secrets create %s --from-prompt", value, name)).Assert(t,
29-
tcli.Success(),
30-
tcli.StderrEmpty(),
31-
)
26+
// // this tests the "Value:" prompt fallback
27+
// c.Run(ctx, fmt.Sprintf("echo %s | coder secrets create %s --from-prompt", value, name)).Assert(t,
28+
// tcli.Success(),
29+
// tcli.StderrEmpty(),
30+
// )
3231

33-
c.Run(ctx, "coder secrets ls").Assert(t,
34-
tcli.Success(),
35-
tcli.StderrEmpty(),
36-
tcli.StdoutMatches("Value"),
37-
tcli.StdoutMatches(regexp.QuoteMeta(name)),
38-
)
32+
// c.Run(ctx, "coder secrets ls").Assert(t,
33+
// tcli.Success(),
34+
// tcli.StderrEmpty(),
35+
// tcli.StdoutMatches("Value"),
36+
// tcli.StdoutMatches(regexp.QuoteMeta(name)),
37+
// )
3938

40-
c.Run(ctx, "coder secrets view "+name).Assert(t,
41-
tcli.Success(),
42-
tcli.StderrEmpty(),
43-
tcli.StdoutMatches(regexp.QuoteMeta(value)),
44-
)
39+
// c.Run(ctx, "coder secrets view "+name).Assert(t,
40+
// tcli.Success(),
41+
// tcli.StderrEmpty(),
42+
// tcli.StdoutMatches(regexp.QuoteMeta(value)),
43+
// )
4544

46-
c.Run(ctx, "coder secrets rm").Assert(t,
47-
tcli.Error(),
48-
)
49-
c.Run(ctx, "coder secrets rm "+name).Assert(t,
50-
tcli.Success(),
51-
)
52-
c.Run(ctx, "coder secrets view "+name).Assert(t,
53-
tcli.Error(),
54-
tcli.StdoutEmpty(),
55-
)
45+
// c.Run(ctx, "coder secrets rm").Assert(t,
46+
// tcli.Error(),
47+
// )
48+
// c.Run(ctx, "coder secrets rm "+name).Assert(t,
49+
// tcli.Success(),
50+
// )
51+
// c.Run(ctx, "coder secrets view "+name).Assert(t,
52+
// tcli.Error(),
53+
// tcli.StdoutEmpty(),
54+
// )
5655

57-
name, value = randString(8), randString(8)
56+
// name, value = randString(8), randString(8)
5857

59-
c.Run(ctx, fmt.Sprintf("coder secrets create %s --from-literal %s", name, value)).Assert(t,
60-
tcli.Success(),
61-
tcli.StderrEmpty(),
62-
)
58+
// c.Run(ctx, fmt.Sprintf("coder secrets create %s --from-literal %s", name, value)).Assert(t,
59+
// tcli.Success(),
60+
// tcli.StderrEmpty(),
61+
// )
6362

64-
c.Run(ctx, "coder secrets view "+name).Assert(t,
65-
tcli.Success(),
66-
tcli.StdoutMatches(regexp.QuoteMeta(value)),
67-
)
63+
// c.Run(ctx, "coder secrets view "+name).Assert(t,
64+
// tcli.Success(),
65+
// tcli.StdoutMatches(regexp.QuoteMeta(value)),
66+
// )
6867

69-
name, value = randString(8), randString(8)
70-
c.Run(ctx, fmt.Sprintf("echo %s > ~/secret.json", value)).Assert(t,
71-
tcli.Success(),
72-
)
73-
c.Run(ctx, fmt.Sprintf("coder secrets create %s --from-file ~/secret.json", name)).Assert(t,
74-
tcli.Success(),
75-
)
76-
c.Run(ctx, "coder secrets view "+name).Assert(t,
77-
tcli.Success(),
78-
tcli.StdoutMatches(regexp.QuoteMeta(value)),
79-
)
80-
})
68+
// name, value = randString(8), randString(8)
69+
// c.Run(ctx, fmt.Sprintf("echo %s > ~/secret.json", value)).Assert(t,
70+
// tcli.Success(),
71+
// )
72+
// c.Run(ctx, fmt.Sprintf("coder secrets create %s --from-file ~/secret.json", name)).Assert(t,
73+
// tcli.Success(),
74+
// )
75+
// c.Run(ctx, "coder secrets view "+name).Assert(t,
76+
// tcli.Success(),
77+
// tcli.StdoutMatches(regexp.QuoteMeta(value)),
78+
// )
79+
// })
8180
}

0 commit comments

Comments
 (0)