Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node Pool fails requiring cluster_id #20

Closed
darkn3rd opened this issue Jun 8, 2018 · 1 comment
Closed

Node Pool fails requiring cluster_id #20

darkn3rd opened this issue Jun 8, 2018 · 1 comment
Assignees

Comments

@darkn3rd
Copy link

darkn3rd commented Jun 8, 2018

Summary

Cannot test node_pool, undocumented and untested requirement for cluster_id.

Reproduce

  describe google_container_node_pool(project: PROJECT_NAME, zone: CLUSTER_ZONE, name: CLUSTER_NAME) do
    it { should exist }
    its('name') { should eq 'default-pool' }
    its('status') { should eq 'in_use' }
    its('config.disk_size_gb') { should eq 100 }
    its('config.machine_type') { should eq 'n1-standard-1' }
  end

OR

  describe google_container_node_pool(project: PROJECT_NAME, zone: CLUSTER_ZONE, name: CLUSTER_NAME, nodepool_name: 'default-pool') do
    it { should exist }
    its('name') { should eq 'default-pool' }
    its('status') { should eq 'in_use' }
    its('config.disk_size_gb') { should eq 100 }
    its('config.machine_type') { should eq 'n1-standard-1' }
  end

Actual

     ×  Nodepool guestbook
     'cluster_id' or cluster in 'parent' must be specified.

Expected

Test should work with cluster name. I don't know about some cluster id, it is not in the source code or integration tests.

Using this for Documentation:

Notes

gcloud container node-pools list --cluster guestbook
NAME          MACHINE_TYPE   DISK_SIZE_GB  NODE_VERSION
default-pool  n1-standard-1  100           1.8.10-gke.0
@skpaterson
Copy link

As correctly pointed out in #19, the documentation was incorrect here, the second example should work as expected but with cluster_name instead of name e.g.

  describe google_container_node_pool(project: PROJECT_NAME, zone: CLUSTER_ZONE, cluster_name: CLUSTER_NAME, nodepool_name: 'default-pool') do
    it { should exist }
    its('name') { should eq 'default-pool' }
    its('status') { should eq 'in_use' }
    its('config.disk_size_gb') { should eq 100 }
    its('config.machine_type') { should eq 'n1-standard-1' }

Rest assured the documentation will be updated to better reflect the arguments.

@skpaterson skpaterson self-assigned this Jun 11, 2018
skpaterson pushed a commit that referenced this issue Jun 11, 2018
* Ensure resources have consistent exists methods.
* Corrected a coupld of arguments in example doc strings.

Signed-off-by: Stuart Paterson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants