|
1 | 1 | package integration
|
2 | 2 |
|
3 | 3 | import (
|
4 |
| - "context" |
5 |
| - "fmt" |
6 |
| - "regexp" |
| 4 | + // "context" |
| 5 | + // "fmt" |
| 6 | + // "regexp" |
7 | 7 | "testing"
|
8 |
| - |
9 |
| - "cdr.dev/coder-cli/pkg/tcli" |
| 8 | + //"cdr.dev/coder-cli/pkg/tcli" |
10 | 9 | )
|
11 | 10 |
|
12 | 11 | 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) |
16 | 15 |
|
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 | + // ) |
20 | 19 |
|
21 |
| - name, value := randString(8), randString(8) |
| 20 | + // name, value := randString(8), randString(8) |
22 | 21 |
|
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 | + // ) |
26 | 25 |
|
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 | + // ) |
32 | 31 |
|
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 | + // ) |
39 | 38 |
|
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 | + // ) |
45 | 44 |
|
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 | + // ) |
56 | 55 |
|
57 |
| - name, value = randString(8), randString(8) |
| 56 | + // name, value = randString(8), randString(8) |
58 | 57 |
|
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 | + // ) |
63 | 62 |
|
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 | + // ) |
68 | 67 |
|
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 | + // }) |
81 | 80 | }
|
0 commit comments