Skip to content

Commit 02f1088

Browse files
committed
fix: add collection install and update os_auth module use.
1 parent 462c2e0 commit 02f1088

File tree

2 files changed

+16
-14
lines changed
  • .github/workflows
  • ansible_collections/serverscom/sc_api/tests/integration/targets/sc_cloud_computing_openstack_credentials/tasks

2 files changed

+16
-14
lines changed

.github/workflows/tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ jobs:
102102
run: |
103103
python -m pip install --upgrade pip
104104
pip install -r requirements.txt
105+
- name: Install dependent collections
106+
run: ansible-galaxy collection install openstack.cloud
105107
- name: Configure integration tests
106108
run: |
107109
envsubst < integration_config.yml.template > ansible_collections/serverscom/sc_api/tests/integration/integration_config.yml

ansible_collections/serverscom/sc_api/tests/integration/targets/sc_cloud_computing_openstack_credentials/tasks/main.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
- name: Check if there are sc_token and sc_endpoint variables
33
no_log: true
44
fail:
5-
msg: 'You need to define sc_token and sc_endpoint variables in tests/integration/integration_config.yml'
5+
msg: "You need to define sc_token and sc_endpoint variables in tests/integration/integration_config.yml"
66
when: not sc_endpoint or not sc_token
77

88
- name: Test invalid token
99
sc_cloud_computing_openstack_credentials:
1010
token: invalid
11-
endpoint: '{{ sc_endpoint }}'
11+
endpoint: "{{ sc_endpoint }}"
1212
region_id: 424242
1313
register: test1
1414
failed_when:
@@ -18,8 +18,8 @@
1818

1919
- name: Test2, List for non-existing region
2020
sc_cloud_computing_openstack_credentials:
21-
token: '{{ sc_token }}'
22-
endpoint: '{{ sc_endpoint }}'
21+
token: "{{ sc_token }}"
22+
endpoint: "{{ sc_endpoint }}"
2323
region_id: 424242
2424
register: test2
2525
failed_when: test2.status_code!=404
@@ -33,15 +33,15 @@
3333

3434
- name: Test3 prep, get regions
3535
sc_cloud_computing_regions_info:
36-
token: '{{ sc_token }}'
37-
endpoint: '{{ sc_endpoint }}'
36+
token: "{{ sc_token }}"
37+
endpoint: "{{ sc_endpoint }}"
3838
register: regions
3939

4040
- name: Test3, Get creds for region1
4141
sc_cloud_computing_openstack_credentials:
42-
token: '{{ sc_token }}'
43-
endpoint: '{{ sc_endpoint }}'
44-
region_id: '{{ regions.regions[0].id }}'
42+
token: "{{ sc_token }}"
43+
endpoint: "{{ sc_endpoint }}"
44+
region_id: "{{ regions.regions[0].id }}"
4545
register: creds
4646

4747
- name: Check Test3
@@ -54,12 +54,12 @@
5454
- creds.password
5555

5656
- name: Validate creds
57-
os_auth:
57+
openstack.cloud.auth:
5858
auth:
59-
auth_url: '{{ creds.url }}'
60-
username: '{{ creds.username }}'
61-
password: '{{ creds.password }}'
62-
project_name: '{{ creds.tenant_name }}'
59+
auth_url: "{{ creds.url }}"
60+
username: "{{ creds.username }}"
61+
password: "{{ creds.password }}"
62+
project_name: "{{ creds.tenant_name }}"
6363
os_user_domain_name: default
6464
os_project_domain_name: default
6565
register: os

0 commit comments

Comments
 (0)