@@ -14,22 +14,44 @@ import (
14
14
func TestInitScript (t * testing.T ) {
15
15
t .Parallel ()
16
16
17
- t .Run ("OK Windows" ,func (t * testing.T ) {
17
+ t .Run ("OK Windows amd64 " ,func (t * testing.T ) {
18
18
t .Parallel ()
19
19
client := coderdtest .New (t ,nil )
20
20
script ,err := client .InitScript (context .Background (),"windows" ,"amd64" )
21
21
require .NoError (t ,err )
22
22
require .NotEmpty (t ,script )
23
23
require .Contains (t ,script ,"$env:CODER_AGENT_AUTH =\" token\" " )
24
+ require .Contains (t ,script ,"/bin/coder-windows-amd64.exe" )
24
25
})
25
26
26
- t .Run ("OK Linux" ,func (t * testing.T ) {
27
+ t .Run ("OK Windows arm64" ,func (t * testing.T ) {
28
+ t .Parallel ()
29
+ client := coderdtest .New (t ,nil )
30
+ script ,err := client .InitScript (context .Background (),"windows" ,"arm64" )
31
+ require .NoError (t ,err )
32
+ require .NotEmpty (t ,script )
33
+ require .Contains (t ,script ,"$env:CODER_AGENT_AUTH =\" token\" " )
34
+ require .Contains (t ,script ,"/bin/coder-windows-arm64.exe" )
35
+ })
36
+
37
+ t .Run ("OK Linux amd64" ,func (t * testing.T ) {
27
38
t .Parallel ()
28
39
client := coderdtest .New (t ,nil )
29
40
script ,err := client .InitScript (context .Background (),"linux" ,"amd64" )
30
41
require .NoError (t ,err )
31
42
require .NotEmpty (t ,script )
32
43
require .Contains (t ,script ,"export CODER_AGENT_AUTH=\" token\" " )
44
+ require .Contains (t ,script ,"/bin/coder-linux-amd64" )
45
+ })
46
+
47
+ t .Run ("OK Linux arm64" ,func (t * testing.T ) {
48
+ t .Parallel ()
49
+ client := coderdtest .New (t ,nil )
50
+ script ,err := client .InitScript (context .Background (),"linux" ,"arm64" )
51
+ require .NoError (t ,err )
52
+ require .NotEmpty (t ,script )
53
+ require .Contains (t ,script ,"export CODER_AGENT_AUTH=\" token\" " )
54
+ require .Contains (t ,script ,"/bin/coder-linux-arm64" )
33
55
})
34
56
35
57
t .Run ("BadRequest" ,func (t * testing.T ) {