Skip to content

Commit f2620e5

Browse files
committed
chore: Update terraform resource testdata
1 parent 7579146 commit f2620e5

22 files changed

+362
-170
lines changed

provisioner/terraform/resources_test.go

+38-29
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ func TestConvertResources(t *testing.T) {
3333
Name: "b",
3434
Type: "null_resource",
3535
Agents: []*proto.Agent{{
36-
Name: "main",
37-
OperatingSystem: "linux",
38-
Architecture: "amd64",
39-
Auth: &proto.Agent_Token{},
36+
Name: "main",
37+
OperatingSystem: "linux",
38+
Architecture: "amd64",
39+
Auth: &proto.Agent_Token{},
40+
ConnectionTimeoutSeconds: 120,
4041
}},
4142
}},
4243
// This can happen when resources hierarchically conflict.
@@ -46,10 +47,11 @@ func TestConvertResources(t *testing.T) {
4647
Name: "first",
4748
Type: "null_resource",
4849
Agents: []*proto.Agent{{
49-
Name: "main",
50-
OperatingSystem: "linux",
51-
Architecture: "amd64",
52-
Auth: &proto.Agent_Token{},
50+
Name: "main",
51+
OperatingSystem: "linux",
52+
Architecture: "amd64",
53+
Auth: &proto.Agent_Token{},
54+
ConnectionTimeoutSeconds: 120,
5355
}},
5456
}, {
5557
Name: "second",
@@ -60,10 +62,11 @@ func TestConvertResources(t *testing.T) {
6062
Name: "main",
6163
Type: "null_resource",
6264
Agents: []*proto.Agent{{
63-
Name: "main",
64-
OperatingSystem: "linux",
65-
Architecture: "amd64",
66-
Auth: &proto.Agent_InstanceId{},
65+
Name: "main",
66+
OperatingSystem: "linux",
67+
Architecture: "amd64",
68+
Auth: &proto.Agent_InstanceId{},
69+
ConnectionTimeoutSeconds: 120,
6770
}},
6871
}},
6972
// Ensures that calls to resources through modules work
@@ -72,10 +75,11 @@ func TestConvertResources(t *testing.T) {
7275
Name: "example",
7376
Type: "null_resource",
7477
Agents: []*proto.Agent{{
75-
Name: "main",
76-
OperatingSystem: "linux",
77-
Architecture: "amd64",
78-
Auth: &proto.Agent_Token{},
78+
Name: "main",
79+
OperatingSystem: "linux",
80+
Architecture: "amd64",
81+
Auth: &proto.Agent_Token{},
82+
ConnectionTimeoutSeconds: 120,
7983
}},
8084
}},
8185
// Ensures the attachment of multiple agents to a single
@@ -84,20 +88,24 @@ func TestConvertResources(t *testing.T) {
8488
Name: "dev",
8589
Type: "null_resource",
8690
Agents: []*proto.Agent{{
87-
Name: "dev1",
88-
OperatingSystem: "linux",
89-
Architecture: "amd64",
90-
Auth: &proto.Agent_Token{},
91+
Name: "dev1",
92+
OperatingSystem: "linux",
93+
Architecture: "amd64",
94+
Auth: &proto.Agent_Token{},
95+
ConnectionTimeoutSeconds: 120,
9196
}, {
92-
Name: "dev2",
93-
OperatingSystem: "darwin",
94-
Architecture: "amd64",
95-
Auth: &proto.Agent_Token{},
97+
Name: "dev2",
98+
OperatingSystem: "darwin",
99+
Architecture: "amd64",
100+
Auth: &proto.Agent_Token{},
101+
ConnectionTimeoutSeconds: 1,
96102
}, {
97-
Name: "dev3",
98-
OperatingSystem: "windows",
99-
Architecture: "arm64",
100-
Auth: &proto.Agent_Token{},
103+
Name: "dev3",
104+
OperatingSystem: "windows",
105+
Architecture: "arm64",
106+
Auth: &proto.Agent_Token{},
107+
ConnectionTimeoutSeconds: 120,
108+
TroubleshootingUrl: "https://coder.com/troubleshoot",
101109
}},
102110
}},
103111
// Ensures multiple applications can be set for a single agent.
@@ -131,7 +139,8 @@ func TestConvertResources(t *testing.T) {
131139
Subdomain: false,
132140
},
133141
},
134-
Auth: &proto.Agent_Token{},
142+
Auth: &proto.Agent_Token{},
143+
ConnectionTimeoutSeconds: 120,
135144
}},
136145
}},
137146
// Tests fetching metadata about workspace resources.

provisioner/terraform/testdata/calling-module/calling-module.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
coder = {
44
source = "coder/coder"
5-
version = "0.6.0"
5+
version = "0.6.1"
66
}
77
}
88
}

provisioner/terraform/testdata/calling-module/calling-module.tfplan.json

+8-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/calling-module/calling-module.tfstate.json

+7-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/chaining-resources/chaining-resources.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
coder = {
44
source = "coder/coder"
5-
version = "0.6.0"
5+
version = "0.6.1"
66
}
77
}
88
}

provisioner/terraform/testdata/chaining-resources/chaining-resources.tfplan.json

+23-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/chaining-resources/chaining-resources.tfstate.json

+14-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/conflicting-resources/conflicting-resources.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
coder = {
44
source = "coder/coder"
5-
version = "0.6.0"
5+
version = "0.6.1"
66
}
77
}
88
}

0 commit comments

Comments
 (0)