@@ -123,11 +123,10 @@ func TestLogs(t *testing.T) {
123
123
"Dockerfile" : fmt .Sprintf (`FROM %s` , testImageUbuntu ),
124
124
},
125
125
})
126
- ctrID , err := runEnvbuilder (t , runOpts {env : []string {
126
+ _ , err := runEnvbuilder (t , runOpts {env : []string {
127
127
envbuilderEnv ("GIT_URL" , srv .URL ),
128
128
"CODER_AGENT_URL=" + logSrv .URL ,
129
129
"CODER_AGENT_TOKEN=" + token ,
130
- "ENVBUILDER_INIT_SCRIPT=env" ,
131
130
}})
132
131
require .NoError (t , err )
133
132
ctx , cancel := context .WithTimeout (context .Background (), time .Minute )
@@ -137,28 +136,6 @@ func TestLogs(t *testing.T) {
137
136
t .Fatal ("timed out waiting for logs" )
138
137
case <- logsDone :
139
138
}
140
-
141
- // Wait for the container to exit
142
- client , err := client .NewClientWithOpts (client .FromEnv , client .WithAPIVersionNegotiation ())
143
- require .NoError (t , err )
144
- require .Eventually (t , func () bool {
145
- status , err := client .ContainerInspect (ctx , ctrID )
146
- if ! assert .NoError (t , err ) {
147
- return false
148
- }
149
- return ! status .State .Running
150
- }, 10 * time .Second , time .Second , "container never exited" )
151
-
152
- // Check the expected log output
153
- logReader , err := client .ContainerLogs (ctx , ctrID , container.LogsOptions {
154
- ShowStdout : true ,
155
- ShowStderr : true ,
156
- })
157
- require .NoError (t , err )
158
- logBytes , err := io .ReadAll (logReader )
159
- require .NoError (t , err )
160
- logs := string (logBytes )
161
- require .Contains (t , logs , "CODER_AGENT_SUBSYSTEM=envbuilder" )
162
139
}
163
140
164
141
func TestInitScriptInitCommand (t * testing.T ) {
0 commit comments