Skip to content

Commit 5167502

Browse files
author
Julien Girardin
committed
Fix dry-run of haproxy migration path
1 parent d96eaa0 commit 5167502

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/features/haproxy.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Feature: Haproxy
3535
When With those group_vars on group all:
3636
apiserver_proxy_use_docker: false
3737
When I reset tasks counters
38+
When I dry-run the playbooks 00_apiserver_proxy.yml
39+
When I reset tasks counters
3840
When I run the playbooks 00_apiserver_proxy.yml
3941
01_site.yml
4042
Then I should have a working cluster

tests/helpers/ansible.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import itertools
22
import os
3+
import re
34

45
import ansible_runner
56

@@ -56,5 +57,6 @@ def run_ansible_playbook(
5657

5758
def assert_ansible_error(run):
5859
assert run.status == "successful"
60+
assert len(re.findall(r"fatal: [.*]: FAILED! =>.*", run.stdout.read())) == 0
5961
for host_failed, number_failed in run.stats.get("failures", {}).items():
6062
assert number_failed == 0

0 commit comments

Comments
 (0)