Skip to content

Commit fdf311b

Browse files
authored
Replace dashboard and volume defaults tests with acceptance tests (#2733)
## Changes - Replace configure_dashboard_defaults_test.go with acceptance test - Replace configure_volume_defaults_test.go with acceptance test ## Why Going to refactor default machinery: #2734
1 parent aea1dfe commit fdf311b

File tree

8 files changed

+79
-207
lines changed

8 files changed

+79
-207
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
bundle:
2+
name: BUNDLE
3+
4+
workspace:
5+
resource_path: /foo/bar
6+
7+
resources:
8+
dashboards:
9+
empty_string:
10+
# unchanged
11+
parent_path: ""
12+
13+
non_empty_string:
14+
# unchanged
15+
parent_path: "already-set"
16+
17+
other_fields:
18+
display_name: hello
19+
# parent_path set default
20+
21+
set_to_true:
22+
embed_credentials: true
23+
24+
completely_empty: {}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"completely_empty": {
3+
"embed_credentials": false,
4+
"parent_path": "/Workspace/foo/bar",
5+
"permissions": []
6+
},
7+
"empty_string": {
8+
"embed_credentials": false,
9+
"parent_path": "",
10+
"permissions": []
11+
},
12+
"non_empty_string": {
13+
"embed_credentials": false,
14+
"parent_path": "already-set",
15+
"permissions": []
16+
},
17+
"other_fields": {
18+
"display_name": "hello",
19+
"embed_credentials": false,
20+
"parent_path": "/Workspace/foo/bar",
21+
"permissions": []
22+
},
23+
"set_to_true": {
24+
"embed_credentials": true,
25+
"parent_path": "/Workspace/foo/bar",
26+
"permissions": []
27+
}
28+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$CLI bundle validate -o json | jq .resources.dashboards
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
bundle:
2+
name: BUNDLE
3+
4+
resources:
5+
volumes:
6+
v1:
7+
volume_type: ""
8+
9+
v2:
10+
volume_type: "already-set"
11+
12+
v3:
13+
comment: hello
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"v1": {
3+
"volume_type": ""
4+
},
5+
"v2": {
6+
"volume_type": "already-set"
7+
},
8+
"v3": {
9+
"comment": "hello",
10+
"volume_type": "MANAGED"
11+
}
12+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$CLI bundle validate -o json | jq .resources.volumes

bundle/config/mutator/resourcemutator/configure_dashboard_defaults_test.go

Lines changed: 0 additions & 131 deletions
This file was deleted.

bundle/config/mutator/resourcemutator/configure_volume_defaults_test.go

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)