Skip to content

Commit 1789d1b

Browse files
authored
Update LDE Node Pool Assertion and Test env variable Handling (#673)
* better test env var handling * update test assertion * add safety * update assertion
1 parent 5ea89ed commit 1789d1b

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ else
122122
exit 1;
123123
endif
124124
@echo "ua_prefix: E2E" >> $(INTEGRATION_CONFIG)
125-
@echo "api_url: $(TEST_API_URL)" >> $(INTEGRATION_CONFIG)
126-
@echo "api_version: $(TEST_API_VERSION)" >> $(INTEGRATION_CONFIG)
127-
@echo "ca_file: $(TEST_API_CA)" >> $(INTEGRATION_CONFIG)
125+
@echo "api_url: $$(url=$${LINODE_API_URL:-$${TEST_API_URL:-https://api.linode.com}}; echo $${url%/}/)" >> $(INTEGRATION_CONFIG)
126+
@echo "api_version: $${LINODE_API_VERSION:-$${TEST_API_VERSION:-v4beta}}" >> $(INTEGRATION_CONFIG)
127+
@echo "ca_file: $${LINODE_CA:-$${TEST_API_CA}}" >> $(INTEGRATION_CONFIG)
128128

129129
inject:
130130
@echo "Injecting documentation into source files"

tests/integration/targets/lke_cluster_basic/tasks/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
- info_by_label.node_pools[0].count == 1
180180
- info_by_label.node_pools[0].id == create_cluster.node_pools[0].id
181181

182-
- name: Create a Linode LKE cluster with a pool with disk encryption enabled
182+
- name: Create a Linode LKE cluster with a pool has disk encryption explicitly set
183183
linode.cloud.lke_cluster:
184184
label: 'ansible-test-de-{{ r }}'
185185
region: '{{ lde_region }}'
@@ -194,7 +194,7 @@
194194
- name: Assert LKE cluster is created
195195
assert:
196196
that:
197-
- create_cluster_disk_encryption.node_pools[0].disk_encryption == 'disabled'
197+
- create_cluster_disk_encryption.node_pools[0].disk_encryption in ['enabled', 'disabled']
198198

199199
always:
200200
- ignore_errors: yes

tests/integration/targets/lke_node_pool_basic/tasks/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
that:
149149
- new_pool_de.node_pool.count == 2
150150
- new_pool_de.node_pool.type == 'g6-standard-1'
151-
- new_pool_de.node_pool.disk_encryption == 'disabled'
151+
- new_pool_de.node_pool.disk_encryption in ['enabled', 'disabled']
152152
- new_pool_de.node_pool.nodes[0].status == 'ready'
153153
- new_pool_de.node_pool.nodes[1].status == 'ready'
154154

0 commit comments

Comments
 (0)