@@ -34,13 +34,17 @@ func TestAccCachedImageResource(t *testing.T) {
34
34
".devcontainer/devcontainer.json" : `{"image": "localhost:5000/test-ubuntu:latest"}` ,
35
35
},
36
36
extraEnv : map [string ]string {
37
- "FOO" : testEnvValue ,
37
+ "CODER_AGENT_TOKEN" : "some-token" ,
38
+ "CODER_AGENT_URL" : "https://coder.example.com" ,
38
39
"ENVBUILDER_GIT_URL" : "https://not.the.real.git/url" ,
39
40
"ENVBUILDER_CACHE_REPO" : "not-the-real-cache-repo" ,
41
+ "FOO" : testEnvValue ,
40
42
},
41
43
assertEnv : func (t * testing.T , deps testDependencies ) resource.TestCheckFunc {
42
44
return resource .ComposeAggregateTestCheckFunc (
43
45
assertEnv (t ,
46
+ "CODER_AGENT_TOKEN" , "some-token" ,
47
+ "CODER_AGENT_URL" , "https://coder.example.com" ,
44
48
"ENVBUILDER_CACHE_REPO" , deps .CacheRepo ,
45
49
"ENVBUILDER_GIT_SSH_PRIVATE_KEY_PATH" , deps .Repo .Key ,
46
50
"ENVBUILDER_GIT_URL" , deps .Repo .URL ,
@@ -62,13 +66,17 @@ func TestAccCachedImageResource(t *testing.T) {
62
66
RUN date > /date.txt` ,
63
67
},
64
68
extraEnv : map [string ]string {
69
+ "CODER_AGENT_TOKEN" : "some-token" ,
70
+ "CODER_AGENT_URL" : "https://coder.example.com" ,
65
71
"FOO" : testEnvValue ,
66
72
"ENVBUILDER_GIT_URL" : "https://not.the.real.git/url" ,
67
73
"ENVBUILDER_CACHE_REPO" : "not-the-real-cache-repo" ,
68
74
},
69
75
assertEnv : func (t * testing.T , deps testDependencies ) resource.TestCheckFunc {
70
76
return resource .ComposeAggregateTestCheckFunc (
71
77
assertEnv (t ,
78
+ "CODER_AGENT_TOKEN" , "some-token" ,
79
+ "CODER_AGENT_URL" , "https://coder.example.com" ,
72
80
"ENVBUILDER_CACHE_REPO" , deps .CacheRepo ,
73
81
"ENVBUILDER_GIT_SSH_PRIVATE_KEY_PATH" , deps .Repo .Key ,
74
82
"ENVBUILDER_GIT_URL" , deps .Repo .URL ,
@@ -89,6 +97,8 @@ RUN date > /date.txt`,
89
97
RUN date > /date.txt` ,
90
98
},
91
99
extraEnv : map [string ]string {
100
+ "CODER_AGENT_TOKEN" : "some-token" ,
101
+ "CODER_AGENT_URL" : "https://coder.example.com" ,
92
102
"FOO" : testEnvValue ,
93
103
"ENVBUILDER_GIT_URL" : "https://not.the.real.git/url" ,
94
104
"ENVBUILDER_CACHE_REPO" : "not-the-real-cache-repo" ,
@@ -99,6 +109,8 @@ RUN date > /date.txt`,
99
109
assertEnv : func (t * testing.T , deps testDependencies ) resource.TestCheckFunc {
100
110
return resource .ComposeAggregateTestCheckFunc (
101
111
assertEnv (t ,
112
+ "CODER_AGENT_TOKEN" , "some-token" ,
113
+ "CODER_AGENT_URL" , "https://coder.example.com" ,
102
114
"ENVBUILDER_CACHE_REPO" , deps .CacheRepo ,
103
115
"ENVBUILDER_DEVCONTAINER_DIR" , "path/to/.devcontainer" ,
104
116
"ENVBUILDER_DEVCONTAINER_JSON_PATH" , "path/to/.devcontainer/devcontainer.json" ,
0 commit comments