tests: vultr_server: adjust plan names, fixes integration test (#53914)

* vultr_server: update plan name, fixes integration tests

* remove superfluous templating in assert
This commit is contained in:
René Moser 2019-03-17 11:28:29 +01:00 committed by GitHub
parent 955da2a095
commit f20575e2a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 45 deletions

View file

@ -8,3 +8,6 @@ vultr_server_ssh_keys:
key: "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAyWYItY+3w5b8PdGRoz0oY5mufqydW96naE+VM3JSvJFAUS08rAjQQpQ03ymoALeHQy6JVZbcgecxn6p0pAOINQdqufn4udPtOPCtMjNiPGpkSM9ah/6X5+kvyWMNrvlf+Ld4OOoszP5sAkgQzIbrFQAm41XknBUha0zkewZwfrVhain4pnDjV7wCcChId/Q/Gbi4xMtXkisznWcAJcueBs3EEZDKhJ5q0VeWSJEhYJDLFN1sOxF0AIUnMrOhfKQ/LjgREXPB6uCl899INUTXRNNjRpeMXyJ2wMMmOAbua2qEd1r13Bu1n+6A823Hzb33fyMXuqWnJwBJ4DCvMlGuEsfuOK+xk7DaBfLHbcM6fsPk0/4psTE6YLgC41remr6+u5ZWsY/faMtSnNPie8Z8Ov0DIYGdhbJjUXk1HomxRV9+ZfZ2Ob8iCwlaAQAyEUM6fs3Kxt8pBD8dx1HOkhsfBWPvuDr5y+kqE7H8/MuPDTc0QgH2pjUMpmw/XBwNDHshVEjrZvtICOjOLUJxcowLO1ivNYwPwowQxfisMy56LfYdjsOslBiqsrkAqvNGm1zu8wKHeqVN9w5l3yUELpvubfm9NKIvYcl6yWF36T0c5vE+g0DU/Jy4XpTj0hZG9QV2mRQcLJnd2pxQtJT7cPFtrn/+tgRxzjEtbDXummDV4sE= mail@renemoser.net"
- name: key2
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoQ9S7V+CufAgwoehnf2TqsJ9LTsu8pUA3FgpS2mdVwcMcTs++8P5sQcXHLtDmNLpWN4k7NQgxaY1oXy5e25x/4VhXaJXWEt3luSw+Phv/PB2+aGLvqCUirsLTAD2r7ieMhd/pcVf/HlhNUQgnO1mupdbDyqZoGD/uCcJiYav8i/V7nJWJouHA8yq31XS2yqXp9m3VC7UZZHzUsVJA9Us5YqF0hKYeaGruIHR2bwoDF9ZFMss5t6/pzxMljU/ccYwvvRDdI7WX4o4+zLuZ6RWvsU6LGbbb0pQdB72tlV41fSefwFsk4JRdKbyV3Xjf25pV4IXOTcqhy+4JTB/jXxrF torwalds@github.com"
vultr_server_plan_1: 1024 MB RAM,25 GB SSD,1.00 TB BW
vultr_server_plan_2: 2048 MB RAM,55 GB SSD,2.00 TB BW

View file

@ -47,7 +47,7 @@
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 1024 MB RAM,25 GB SSD,1.00 TB BW
plan: "{{ vultr_server_plan_1 }}"
ssh_keys:
- key1
- key2
@ -64,7 +64,7 @@
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 1024 MB RAM,25 GB SSD,1.00 TB BW
plan: "{{ vultr_server_plan_1 }}"
ssh_keys:
- key1
- key2
@ -75,9 +75,9 @@
assert:
that:
- result is changed
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '1024 MB RAM,25 GB SSD,1.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_1
- result.vultr_server.region == 'Amsterdam'
- result.vultr_server.power_status == 'running'
@ -85,7 +85,7 @@
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 1024 MB RAM,25 GB SSD,1.00 TB BW
plan: "{{ vultr_server_plan_1 }}"
ssh_keys:
- key1
- key2
@ -97,9 +97,9 @@
that:
- result is not changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '1024 MB RAM,25 GB SSD,1.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_1
- result.vultr_server.region == 'Amsterdam'
- name: test stop an existing server in check mode
@ -113,7 +113,7 @@
that:
- result is changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
@ -127,7 +127,7 @@
that:
- result is changed
- result.vultr_server.power_status == 'stopped'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
@ -141,7 +141,7 @@
that:
- result is not changed
- result.vultr_server.power_status == 'stopped'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
@ -156,7 +156,7 @@
that:
- result is changed
- result.vultr_server.power_status == 'stopped'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
@ -170,7 +170,7 @@
that:
- result is changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
@ -184,7 +184,7 @@
that:
- result is not changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
@ -192,7 +192,7 @@
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 2048 MB RAM,40 GB SSD,2.00 TB BW
plan: "{{ vultr_server_plan_2 }}"
region: Amsterdam
register: result
check_mode: yes
@ -201,16 +201,16 @@
that:
- result is not changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '1024 MB RAM,25 GB SSD,1.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_1
- result.vultr_server.region == 'Amsterdam'
- name: test update plan for server without force
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 2048 MB RAM,40 GB SSD,2.00 TB BW
plan: "{{ vultr_server_plan_2 }}"
region: Amsterdam
register: result
- name: verify test update plan for server without force
@ -218,9 +218,9 @@
that:
- result is not changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '1024 MB RAM,25 GB SSD,1.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_1
- result.vultr_server.region == 'Amsterdam'
- name: setup firewall group
@ -262,9 +262,9 @@
that:
- result is changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '1024 MB RAM,25 GB SSD,1.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_1
- result.vultr_server.region == 'Amsterdam'
- result.vultr_server.tag == ''
- result.vultr_server.firewall_group != 'test_firewall_group'
@ -282,7 +282,7 @@
that:
- result is changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
- result.vultr_server.tag == 'test_tag'
@ -301,7 +301,7 @@
that:
- result is not changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
- result.vultr_server.tag == 'test_tag'
@ -311,7 +311,7 @@
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 2048 MB RAM,40 GB SSD,2.00 TB BW
plan: "{{ vultr_server_plan_2 }}"
auto_backup_enabled: yes
region: Amsterdam
force: yes
@ -322,9 +322,9 @@
that:
- result is changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '1024 MB RAM,25 GB SSD,1.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_1
- result.vultr_server.region == 'Amsterdam'
- result.vultr_server.auto_backup_enabled == false
@ -332,7 +332,7 @@
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 2048 MB RAM,40 GB SSD,2.00 TB BW
plan: "{{ vultr_server_plan_2 }}"
auto_backup_enabled: yes
region: Amsterdam
force: yes
@ -342,9 +342,9 @@
that:
- result is changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '2048 MB RAM,40 GB SSD,2.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_2
- result.vultr_server.region == 'Amsterdam'
- result.vultr_server.auto_backup_enabled == true
@ -352,7 +352,7 @@
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 2048 MB RAM,40 GB SSD,2.00 TB BW
plan: "{{ vultr_server_plan_2 }}"
auto_backup_enabled: true
region: Amsterdam
force: true
@ -362,9 +362,9 @@
that:
- result is not changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '2048 MB RAM,40 GB SSD,2.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_2
- result.vultr_server.region == 'Amsterdam'
- result.vultr_server.auto_backup_enabled == true
@ -372,7 +372,7 @@
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 2048 MB RAM,40 GB SSD,2.00 TB BW
plan: "{{ vultr_server_plan_2 }}"
ipv6_enabled: true
region: Amsterdam
state: stopped
@ -383,9 +383,9 @@
that:
- result is changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '2048 MB RAM,40 GB SSD,2.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_2
- result.vultr_server.region == 'Amsterdam'
- result.vultr_server.v6_main_ip == ''
@ -393,7 +393,7 @@
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 2048 MB RAM,40 GB SSD,2.00 TB BW
plan: "{{ vultr_server_plan_2 }}"
ipv6_enabled: true
region: Amsterdam
state: stopped
@ -403,9 +403,9 @@
that:
- result is changed
- result.vultr_server.power_status == 'stopped'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '2048 MB RAM,40 GB SSD,2.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_2
- result.vultr_server.region == 'Amsterdam'
- result.vultr_server.v6_main_ip != ''
@ -413,7 +413,7 @@
vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 6 x64
plan: 2048 MB RAM,40 GB SSD,2.00 TB BW
plan: "{{ vultr_server_plan_2 }}"
region: Amsterdam
state: stopped
register: result
@ -422,9 +422,9 @@
that:
- result is not changed
- result.vultr_server.power_status == 'stopped'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.plan == '2048 MB RAM,40 GB SSD,2.00 TB BW'
- result.vultr_server.plan == vultr_server_plan_2
- result.vultr_server.region == 'Amsterdam'
- result.vultr_server.v6_main_ip != ''
@ -439,7 +439,7 @@
that:
- result is changed
- result.vultr_server.power_status == 'stopped'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
@ -453,7 +453,7 @@
that:
- result is changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
@ -468,7 +468,7 @@
that:
- result is changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'
@ -486,7 +486,7 @@
that:
- result is changed
- result.vultr_server.power_status == 'running'
- result.vultr_server.name == '{{ vultr_server_name }}'
- result.vultr_server.name == vultr_server_name
- result.vultr_server.os == 'CentOS 6 x64'
- result.vultr_server.region == 'Amsterdam'