Skip to content

Commit 9a6565d

Browse files
committed
Adds missing fixture files
1 parent a0db032 commit 9a6565d

File tree

6 files changed

+153
-3
lines changed

6 files changed

+153
-3
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
version: 1
3+
interactions:
4+
- request:
5+
body: ""
6+
form: {}
7+
headers:
8+
Accept:
9+
- application/json
10+
Content-Type:
11+
- application/json
12+
User-Agent:
13+
- linodego/dev https://github.com/linode/linodego
14+
url: https://api.linode.com/v4beta/monitor/dashboards/999999
15+
method: GET
16+
response:
17+
body: '{"errors": [{"reason": "Not found"}]}'
18+
headers:
19+
Access-Control-Allow-Headers:
20+
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
21+
Access-Control-Allow-Methods:
22+
- HEAD, GET, OPTIONS, POST, PUT, DELETE
23+
Access-Control-Allow-Origin:
24+
- '*'
25+
Akamai-Internal-Account:
26+
- '*'
27+
Cache-Control:
28+
- private, max-age=0, s-maxage=0, no-cache, no-store
29+
Connection:
30+
- keep-alive
31+
Content-Length:
32+
- "37"
33+
Content-Type:
34+
- application/json
35+
Server:
36+
- nginx/1.18.0
37+
Strict-Transport-Security:
38+
- max-age=31536000
39+
Vary:
40+
- Authorization, X-Filter
41+
X-Accepted-Oauth-Scopes:
42+
- monitor:read_only
43+
X-Frame-Options:
44+
- DENY
45+
X-Oauth-Scopes:
46+
- '*'
47+
X-Ratelimit-Limit:
48+
- "400"
49+
status: 404 NOT FOUND
50+
code: 404
51+
duration: ""
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
version: 1
3+
interactions:
4+
- request:
5+
body: ""
6+
form: {}
7+
headers:
8+
Accept:
9+
- application/json
10+
Content-Type:
11+
- application/json
12+
User-Agent:
13+
- linodego/dev https://github.com/linode/linodego
14+
url: https://api.linode.com/v4beta/monitor/services/saas?page=1
15+
method: GET
16+
response:
17+
body: '{"errors": [{"reason": "Not found"}]}'
18+
headers:
19+
Access-Control-Allow-Headers:
20+
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
21+
Access-Control-Allow-Methods:
22+
- HEAD, GET, OPTIONS, POST, PUT, DELETE
23+
Access-Control-Allow-Origin:
24+
- '*'
25+
Akamai-Internal-Account:
26+
- '*'
27+
Cache-Control:
28+
- private, max-age=0, s-maxage=0, no-cache, no-store
29+
Connection:
30+
- keep-alive
31+
Content-Length:
32+
- "37"
33+
Content-Type:
34+
- application/json
35+
Server:
36+
- nginx/1.18.0
37+
Strict-Transport-Security:
38+
- max-age=31536000
39+
Vary:
40+
- Authorization, X-Filter
41+
X-Accepted-Oauth-Scopes:
42+
- monitor:read_only
43+
X-Frame-Options:
44+
- DENY
45+
X-Oauth-Scopes:
46+
- '*'
47+
X-Ratelimit-Limit:
48+
- "400"
49+
status: 404 NOT FOUND
50+
code: 404
51+
duration: ""
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
version: 1
3+
interactions:
4+
- request:
5+
body: '{"entity_ids":[999999999]}'
6+
form: {}
7+
headers:
8+
Accept:
9+
- application/json
10+
Content-Type:
11+
- application/json
12+
User-Agent:
13+
- linodego/dev https://github.com/linode/linodego
14+
url: https://api.linode.com/v4beta/monitor/services/dbaas/token
15+
method: POST
16+
response:
17+
body: '{"errors": [{"reason": "The following entity_ids are not valid - [999999999]",
18+
"field": "entity_ids"}]}'
19+
headers:
20+
Access-Control-Allow-Headers:
21+
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
22+
Access-Control-Allow-Methods:
23+
- HEAD, GET, OPTIONS, POST, PUT, DELETE
24+
Access-Control-Allow-Origin:
25+
- '*'
26+
Akamai-Internal-Account:
27+
- '*'
28+
Connection:
29+
- keep-alive
30+
Content-Length:
31+
- "103"
32+
Content-Type:
33+
- application/json
34+
Server:
35+
- nginx/1.18.0
36+
Strict-Transport-Security:
37+
- max-age=31536000
38+
X-Accepted-Oauth-Scopes:
39+
- databases:read_only
40+
X-Frame-Options:
41+
- DENY
42+
X-Oauth-Scopes:
43+
- '*'
44+
X-Ratelimit-Limit:
45+
- "400"
46+
status: 403 FORBIDDEN
47+
code: 403
48+
duration: ""

test/integration/monitor_dashboards_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func TestMonitorDashboards_Get_smoke(t *testing.T) {
6060
}
6161

6262
func TestMonitorDashboards_GetNotExistingDashboardID(t *testing.T) {
63-
client, teardown := createTestClient(t, "fixtures/TestMonitorDashboards_Get")
63+
client, teardown := createTestClient(t, "fixtures/TestMonitorInvalidDashboard_Get")
6464
defer teardown()
6565

6666
_, getErr := client.GetMonitorDashboard(context.Background(), 999999)

test/integration/monitor_services_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func TestMonitorServices_Get_smoke(t *testing.T) {
4343
}
4444

4545
func TestMonitorServices_GetNotAllowedServiceType(t *testing.T) {
46-
client, teardown := createTestClient(t, "fixtures/TestMonitorServices_Get")
46+
client, teardown := createTestClient(t, "fixtures/TestMonitorNotAllowedServiceType_Get")
4747
defer teardown()
4848

4949
_, getErr := client.ListMonitorServiceByType(context.Background(), "saas", nil)

test/integration/monitor_services_token_creation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func TestMonitorServicesTokenCreation_TryCreateTokenWithInvalidEntityID(t *testi
5151
var entityIDs []any
5252
entityIDs = append(entityIDs, 999999999)
5353

54-
client, teardown := createTestClient(t, "fixtures/TestServiceToken_POST")
54+
client, teardown := createTestClient(t, "fixtures/TestServiceTokenInvalidEntity_POST")
5555
defer teardown()
5656
createOptsWithInvalidID := linodego.MonitorTokenCreateOptions{
5757
EntityIDs: entityIDs,

0 commit comments

Comments
 (0)