Skip to content

Commit

Permalink
Fix dry-run of haproxy migration path
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Girardin committed Dec 11, 2023
1 parent d96eaa0 commit 5167502
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/features/haproxy.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Feature: Haproxy
When With those group_vars on group all:
apiserver_proxy_use_docker: false
When I reset tasks counters
When I dry-run the playbooks 00_apiserver_proxy.yml
When I reset tasks counters
When I run the playbooks 00_apiserver_proxy.yml
01_site.yml
Then I should have a working cluster
2 changes: 2 additions & 0 deletions tests/helpers/ansible.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import itertools
import os
import re

import ansible_runner

Expand Down Expand Up @@ -56,5 +57,6 @@ def run_ansible_playbook(

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

0 comments on commit 5167502

Please sign in to comment.