File tree 3 files changed +13
-1
lines changed
test/integration/simple_example/controls
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -27,3 +27,14 @@ module "cli" {
27
27
create_cmd_body = " services enable youtube.googleapis.com --project ${ var . project_id } "
28
28
destroy_cmd_body = " services disable youtube.googleapis.com --project ${ var . project_id } "
29
29
}
30
+
31
+ module "cli-disabled" {
32
+ source = " ../.."
33
+
34
+ platform = " linux"
35
+ additional_components = [" kubectl" , " beta" ]
36
+
37
+ enabled = false
38
+ create_cmd_body = " services enable datastore.googleapis.com --project ${ var . project_id } "
39
+ destroy_cmd_body = " services disable datastore.googleapis.com --project ${ var . project_id } "
40
+ }
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ locals {
22
22
gcloud_bin_abs_path = abspath (local. gcloud_bin_path )
23
23
components = join (" ," , var. additional_components )
24
24
25
- download_override = data. external . env_override [0 ]. result . download
25
+ download_override = var . enabled ? data. external . env_override [0 ]. result . download : " "
26
26
skip_download = local. download_override == " always" ? false : (local. download_override == " never" ? true : var. skip_download )
27
27
28
28
gcloud = local. skip_download ? " gcloud" : " ${ local . gcloud_bin_path } /gcloud"
Original file line number Diff line number Diff line change 19
19
its ( :exit_status ) { should eq 0 }
20
20
its ( :stderr ) { should eq "" }
21
21
its ( :stdout ) { should match "youtube.googleapis.com" }
22
+ its ( :stdout ) { should_not match "datastore.googleapis.com" }
22
23
end
23
24
end
You can’t perform that action at this time.
0 commit comments