Skip to content

Commit

Permalink
chore: fix test .netrc permissions, nodepool pod range fixture (#1004)
Browse files Browse the repository at this point in the history
* Update int.cloudbuild.yaml

* fix custom node podrange test fixture
  • Loading branch information
bharathkkb committed Sep 22, 2021
1 parent d72e595 commit d2f1105
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ steps:
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && download_acm']
- id: prepare
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment && sleep 120']
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment && chmod 600 /builder/home/.netrc && sleep 120']
env:
- 'TF_VAR_org_id=$_ORG_ID'
- 'TF_VAR_folder_id=$_FOLDER_ID'
Expand Down
6 changes: 5 additions & 1 deletion test/fixtures/node_pool/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,9 @@ resource "google_compute_subnetwork" "main" {
range_name = "cft-gke-test-services-${random_string.suffix.result}"
ip_cidr_range = "192.168.64.0/18"
}
}

secondary_ip_range {
range_name = "test"
ip_cidr_range = "172.16.0.0/18"
}
}
12 changes: 12 additions & 0 deletions test/integration/node_pool/controls/gcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,18 @@
)
end

it "has the expected pod range" do
expect(data['nodePools']).to include(
including(
"name" => "pool-03",
"networkConfig" => including(
"podIpv4CidrBlock" => "172.16.0.0/18",
"podRange" => "test"
)
)
)
end

it "has the expected linux node config sysctls" do
expect(data['nodePools']).to include(
including(
Expand Down

0 comments on commit d2f1105

Please sign in to comment.