-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: refactor all integration tests for consistency (#490)
* refactor all integration tests for consistency and fix some intermittent failures * missed couple * update gitsubmodule
- Loading branch information
1 parent
6e81059
commit 7767904
Showing
63 changed files
with
461 additions
and
271 deletions.
There are no files selected for viewing
5 changes: 3 additions & 2 deletions
5
tests/integration/targets/account_availability_info/tasks/main.yaml
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
6 changes: 4 additions & 2 deletions
6
tests/integration/targets/account_availability_list/tasks/main.yaml
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,20 +1,23 @@ | ||
- name: api_request_baisc | ||
- name: api_request_basic | ||
block: | ||
- set_fact: | ||
r: "{{ 1000000000 | random }}" | ||
|
||
- linode.cloud.api_request: | ||
- name: GET api_request request | ||
linode.cloud.api_request: | ||
# Arbitrary authorized endpoint | ||
path: lke/versions | ||
method: GET | ||
register: response_get | ||
|
||
- assert: | ||
- name: Assert GET api_request response | ||
assert: | ||
that: | ||
- response_get.status == 200 | ||
- response_get.changed == False | ||
|
||
- linode.cloud.api_request: | ||
- name: POST api_request request | ||
linode.cloud.api_request: | ||
path: domains | ||
method: POST | ||
body: | ||
|
@@ -23,38 +26,44 @@ | |
soa_email: [email protected] | ||
register: response_post | ||
|
||
- assert: | ||
- name: Assert POST api_request response | ||
assert: | ||
that: | ||
- response_post.status == 200 | ||
- response_post.changed == True | ||
|
||
- linode.cloud.api_request: | ||
- name: PUT api_request request | ||
linode.cloud.api_request: | ||
path: 'domains/{{ response_post.body.id }}' | ||
method: PUT | ||
body: | ||
description: cool | ||
register: response_put | ||
|
||
- assert: | ||
- name: Assert PUT api_request response | ||
assert: | ||
that: | ||
- response_put.status == 200 | ||
- response_put.changed == True | ||
- response_put.body.description == 'cool' | ||
|
||
- linode.cloud.api_request: | ||
- name: PUT api_request request (negative case) | ||
linode.cloud.api_request: | ||
path: 'reallycoolfakepath' | ||
method: PUT | ||
register: response_failed | ||
failed_when: response_failed.failed == False | ||
always: | ||
- ignore_errors: yes | ||
block: | ||
- linode.cloud.api_request: | ||
- name: DELETE api_request request | ||
linode.cloud.api_request: | ||
path: 'domains/{{ response_post.body.id }}' | ||
method: DELETE | ||
register: response_delete | ||
|
||
- assert: | ||
- name: Assert DELETE api_request response | ||
assert: | ||
that: | ||
- response_delete.status == 200 | ||
- response_delete.changed == True | ||
|
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
10 changes: 6 additions & 4 deletions
10
tests/integration/targets/database_engine_list/tasks/main.yaml
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
Oops, something went wrong.