Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit f16399e

Browse files
committed
tests: fix running tests in containers being confused with container deployment
1 parent f0f13ae commit f16399e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

molecule/base_molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ provisioner:
2727
aliases:
2828
# allow access via short DNS name
2929
- "{{ item.name }}"
30+
# used to switch the testing branch
31+
tests_is_container: False
3032
host_vars:
3133
ansible-test-builder:
3234
ansible-test-web:

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@
141141

142142
- name: "Schedule build and sync"
143143
include_tasks: schedule_build_and_sync.yml
144-
when: ansible_env.container is undefined
144+
when: (tests_is_container is defined) | ternary(not tests_is_container, ansible_env.container is undefined)
145145

146146
- name: "Build now (container)"
147147
include_tasks: build.yml
148-
when: ansible_env.container is defined and builder_container_build_now|bool
148+
when: ((tests_is_container is defined) | ternary(tests_is_container, ansible_env.container is defined)) and builder_container_build_now|bool
149149

0 commit comments

Comments
 (0)