forked from linode/ansible_linode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into TPT-3085-add-authorized-users-to-instance
- Loading branch information
Showing
6 changed files
with
28 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
linode-api4>=5.22.0 | ||
linode-api4>=5.24.0 | ||
polling==0.3.2 | ||
ansible-specdoc>=0.0.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
- name: api_error | ||
block: | ||
- name: Attempt to create an instance with validation errors | ||
linode.cloud.instance: | ||
region: fake-region | ||
type: g6-fake-plan | ||
state: present | ||
register: failing_request | ||
failed_when: '"msg" not in failing_request' | ||
|
||
- name: Ensure the error message is formatted as expected | ||
assert: | ||
that: | ||
- failing_request.changed == False | ||
- 'failing_request.msg.startswith("Error from Linode API: POST /v4beta/linode/instances: [400]")' | ||
- '"type: A valid plan type by that ID was not found" in failing_request.msg' | ||
- '"region: region is not valid" in failing_request.msg' | ||
|
||
environment: | ||
LINODE_UA_PREFIX: '{{ ua_prefix }}' | ||
LINODE_API_TOKEN: '{{ api_token }}' | ||
LINODE_API_URL: '{{ api_url }}' | ||
LINODE_API_VERSION: '{{ api_version }}' | ||
LINODE_CA: '{{ ca_file or "" }}' |