Skip to content

Commit d2f1105

Browse files
authored
chore: fix test .netrc permissions, nodepool pod range fixture (terraform-google-modules#1004)
* Update int.cloudbuild.yaml * fix custom node podrange test fixture
1 parent d72e595 commit d2f1105

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

build/int.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ steps:
1919
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && download_acm']
2020
- id: prepare
2121
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
22-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment && sleep 120']
22+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment && chmod 600 /builder/home/.netrc && sleep 120']
2323
env:
2424
- 'TF_VAR_org_id=$_ORG_ID'
2525
- 'TF_VAR_folder_id=$_FOLDER_ID'

test/fixtures/node_pool/network.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,9 @@ resource "google_compute_subnetwork" "main" {
4444
range_name = "cft-gke-test-services-${random_string.suffix.result}"
4545
ip_cidr_range = "192.168.64.0/18"
4646
}
47-
}
4847

48+
secondary_ip_range {
49+
range_name = "test"
50+
ip_cidr_range = "172.16.0.0/18"
51+
}
52+
}

test/integration/node_pool/controls/gcloud.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,18 @@
429429
)
430430
end
431431

432+
it "has the expected pod range" do
433+
expect(data['nodePools']).to include(
434+
including(
435+
"name" => "pool-03",
436+
"networkConfig" => including(
437+
"podIpv4CidrBlock" => "172.16.0.0/18",
438+
"podRange" => "test"
439+
)
440+
)
441+
)
442+
end
443+
432444
it "has the expected linux node config sysctls" do
433445
expect(data['nodePools']).to include(
434446
including(

0 commit comments

Comments
 (0)