mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
cloud_server Improve error handling when using not existing server types (#81)
This commit is contained in:
parent
04ef10041e
commit
c5e8e980f6
3 changed files with 31 additions and 4 deletions
|
|
@ -20,6 +20,21 @@
|
|||
that:
|
||||
- result is failed
|
||||
- 'result.msg == "missing required arguments: server_type, image"'
|
||||
|
||||
- name: test create server with not existing server type
|
||||
hcloud_server:
|
||||
name: "{{ hcloud_server_name }}"
|
||||
server_type: not-existing-server-type
|
||||
image: ubuntu-20.04
|
||||
state: present
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
- name: verify fail test create server with not existing server type
|
||||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
- 'result.msg == "server_type not-existing-server-type was not found"'
|
||||
|
||||
- name: test create server with not existing image
|
||||
hcloud_server:
|
||||
name: "{{ hcloud_server_name }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue