Skip to content

Commit d1317cb

Browse files
authored
TPT-4446: Fix failing smoke tests (#974)
* Update domain name in setupDomain func to be unique * Fix TestAccountEvents_List_smoke, setupLKECluster, createPostgresDatabase, TestVolume_Create_smoke # Conflicts: # test/integration/lke_clusters_test.go # test/integration/volumes_test.go * Update tags for linode-tpt and add IPv6 range in TestLKECluster_Enterprise_BYOVPC_smoke * Address Copilot remarks * Add waits and skip to smoke tests * Add dynamic waits and re-run fixtures * Revert changes in TestObjectStorageQuotas_ tests done in #980 * Fix TestObjectStorageQuotaUsage_Get * Address Copilot remarks * Remove t.Skip from TestMonitorDashboards_Get_smoke as #979 solved the issue * Update fixture for TestMonitorDashboards_Get_smoke * Add getExistingObjectStorageQuotaID to retrieve account-specific quota objects * Address PR remarks
1 parent 8501733 commit d1317cb

21 files changed

Lines changed: 6552 additions & 3621 deletions

test/integration/account_events_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package integration
33
import (
44
"context"
55
"testing"
6+
"time"
67

78
"github.com/linode/linodego/v2"
89
)
@@ -21,6 +22,9 @@ func TestAccountEvents_List_smoke(t *testing.T) {
2122
t.Error(err)
2223
}
2324

25+
// Sometimes it takes a bit longer to create a config
26+
time.Sleep(time.Second * 3)
27+
2428
f := linodego.Filter{}
2529
f.AddField(linodego.Eq, "entity.id", instance.ID)
2630
f.AddField(linodego.Eq, "entity.type", "linode")

test/integration/domains_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func setupDomain(t *testing.T, fixturesYaml string) (*linodego.Client, *linodego
9292
client, fixtureTeardown := createTestClient(t, fixturesYaml)
9393

9494
createOpts := testDomainCreateOpts
95-
createOpts.Domain = "linodego-blue-test.com"
95+
createOpts.Domain = "linodego-blue-" + randString(6, digits) + "-test.com"
9696

9797
domain, err := client.CreateDomain(context.Background(), createOpts)
9898
if err != nil {

test/integration/fixtures/TestAccountEvents_List.yaml

Lines changed: 358 additions & 284 deletions
Large diffs are not rendered by default.

test/integration/fixtures/TestLKECluster_Enterprise_BYOVPC_smoke.yaml

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,17 @@ interactions:
1414
url: https://api.linode.com/v4beta/lke/tiers/enterprise/versions?page=1
1515
method: GET
1616
response:
17-
body: '{"data": [{"id": "v1.31.8+lke5", "tier": "enterprise"}], "page": 1, "pages":
18-
1, "results": 1}'
17+
body: '{"data": [{"id": "v1.33.6+lke7", "tier": "enterprise"}, {"id": "v1.33.6+lke6",
18+
"tier": "enterprise"}, {"id": "v1.32.9+lke4", "tier": "enterprise"}, {"id":
19+
"v1.32.9+lke2", "tier": "enterprise"}, {"id": "v1.32.8+lke13", "tier": "enterprise"},
20+
{"id": "v1.32.8+lke12", "tier": "enterprise"}, {"id": "v1.32.8+lke10", "tier":
21+
"enterprise"}, {"id": "v1.31.9+lke7", "tier": "enterprise"}, {"id": "v1.31.9+lke6",
22+
"tier": "enterprise"}, {"id": "v1.31.9+lke5", "tier": "enterprise"}, {"id":
23+
"v1.31.8+lke5", "tier": "enterprise"}, {"id": "v1.31.8+lke3", "tier": "enterprise"},
24+
{"id": "v1.31.8+lke1", "tier": "enterprise"}, {"id": "v1.31.6+lke3", "tier":
25+
"enterprise"}, {"id": "v1.31.6+lke2", "tier": "enterprise"}, {"id": "v1.31.1+lke4",
26+
"tier": "enterprise"}, {"id": "v1.31.1+lke1", "tier": "enterprise"}, {"id":
27+
"v1.29.4+lke1", "tier": "enterprise"}], "page": 1, "pages": 1, "results": 18}'
1928
headers:
2029
Access-Control-Allow-Credentials:
2130
- "true"
@@ -33,21 +42,20 @@ interactions:
3342
- max-age=0, no-cache, no-store
3443
Connection:
3544
- keep-alive
36-
Content-Length:
37-
- "93"
3845
Content-Security-Policy:
3946
- default-src 'none'
4047
Content-Type:
4148
- application/json
4249
Expires:
43-
- Tue, 19 Aug 2025 16:56:21 GMT
50+
- Tue, 02 Jun 2026 10:03:27 GMT
4451
Pragma:
4552
- no-cache
4653
Strict-Transport-Security:
4754
- max-age=31536000
4855
Vary:
4956
- Authorization, X-Filter
5057
- Authorization, X-Filter
58+
- Accept-Encoding
5159
X-Accepted-Oauth-Scopes:
5260
- lke:read_only
5361
X-Content-Type-Options:
@@ -63,7 +71,7 @@ interactions:
6371
code: 200
6472
duration: ""
6573
- request:
66-
body: '{"node_pools":[{"count":1,"type":"g6-standard-2","disks":null,"tags":["test"],"labels":null,"taints":null}],"label":"go-test-def","region":"no-osl-1","k8s_version":"v1.31.8+lke5","tags":["testing"],"tier":"enterprise","vpc_id":224219,"stack_type":"ipv4-ipv6"}'
74+
body: '{"node_pools":[{"count":1,"type":"g6-standard-2","disks":null,"tags":["test"],"labels":null,"taints":null}],"label":"go-test-def","region":"es-mad","k8s_version":"v1.33.6+lke7","tags":["testing"],"tier":"enterprise","vpc_id":505334,"stack_type":"ipv4-ipv6"}'
6775
form: {}
6876
headers:
6977
Accept:
@@ -75,11 +83,12 @@ interactions:
7583
url: https://api.linode.com/v4beta/lke/clusters
7684
method: POST
7785
response:
78-
body: '{"id": 508689, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
79-
"2018-01-02T03:04:05", "label": "go-test-def", "region": "no-osl-1", "k8s_version":
80-
"v1.31.8+lke5", "tier": "enterprise", "control_plane": {"high_availability":
81-
true, "audit_logs_enabled": false}, "apl_enabled": false, "vpc_id": 224219,
82-
"subnet_id": null, "tags": ["testing"], "stack_type": "ipv4-ipv6"}'
86+
body: '{"id": 611915, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
87+
"2018-01-02T03:04:05", "label": "go-test-def", "region": "es-mad", "k8s_version":
88+
"v1.33.6+lke7", "tier": "enterprise", "control_plane": {"high_availability":
89+
true, "audit_logs_enabled": false}, "apl_enabled": false, "vpc_id": 505334,
90+
"subnet_id": null, "tags": ["testing"], "stack_type": "ipv4-ipv6", "locks":
91+
[]}'
8392
headers:
8493
Access-Control-Allow-Credentials:
8594
- "true"
@@ -98,13 +107,13 @@ interactions:
98107
Connection:
99108
- keep-alive
100109
Content-Length:
101-
- "382"
110+
- "393"
102111
Content-Security-Policy:
103112
- default-src 'none'
104113
Content-Type:
105114
- application/json
106115
Expires:
107-
- Tue, 19 Aug 2025 16:56:27 GMT
116+
- Tue, 02 Jun 2026 10:03:34 GMT
108117
Pragma:
109118
- no-cache
110119
Strict-Transport-Security:
@@ -137,14 +146,15 @@ interactions:
137146
- application/json
138147
User-Agent:
139148
- linodego/dev https://github.com/linode/linodego
140-
url: https://api.linode.com/v4beta/lke/clusters/508689
149+
url: https://api.linode.com/v4beta/lke/clusters/611915
141150
method: GET
142151
response:
143-
body: '{"id": 508689, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
144-
"2018-01-02T03:04:05", "label": "go-test-def", "region": "no-osl-1", "k8s_version":
145-
"v1.31.8+lke5", "tier": "enterprise", "control_plane": {"high_availability":
146-
true, "audit_logs_enabled": false}, "apl_enabled": false, "vpc_id": 224219,
147-
"subnet_id": null, "tags": ["testing"], "stack_type": "ipv4-ipv6"}'
152+
body: '{"id": 611915, "status": "ready", "created": "2018-01-02T03:04:05", "updated":
153+
"2018-01-02T03:04:05", "label": "go-test-def", "region": "es-mad", "k8s_version":
154+
"v1.33.6+lke7", "tier": "enterprise", "control_plane": {"high_availability":
155+
true, "audit_logs_enabled": false}, "apl_enabled": false, "vpc_id": 505334,
156+
"subnet_id": null, "tags": ["testing"], "stack_type": "ipv4-ipv6", "locks":
157+
[]}'
148158
headers:
149159
Access-Control-Allow-Credentials:
150160
- "true"
@@ -163,13 +173,13 @@ interactions:
163173
Connection:
164174
- keep-alive
165175
Content-Length:
166-
- "382"
176+
- "393"
167177
Content-Security-Policy:
168178
- default-src 'none'
169179
Content-Type:
170180
- application/json
171181
Expires:
172-
- Tue, 19 Aug 2025 16:56:27 GMT
182+
- Tue, 02 Jun 2026 10:03:34 GMT
173183
Pragma:
174184
- no-cache
175185
Strict-Transport-Security:
@@ -203,7 +213,7 @@ interactions:
203213
- application/json
204214
User-Agent:
205215
- linodego/dev https://github.com/linode/linodego
206-
url: https://api.linode.com/v4beta/lke/clusters/508689
216+
url: https://api.linode.com/v4beta/lke/clusters/611915
207217
method: DELETE
208218
response:
209219
body: '{}'
@@ -231,7 +241,7 @@ interactions:
231241
Content-Type:
232242
- application/json
233243
Expires:
234-
- Tue, 19 Aug 2025 16:56:29 GMT
244+
- Tue, 02 Jun 2026 10:03:36 GMT
235245
Pragma:
236246
- no-cache
237247
Strict-Transport-Security:

0 commit comments

Comments
 (0)