mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fix test_issue_30161_unless_and_onlyif_together for MacOSX
This commit is contained in:
parent
01708258ba
commit
4002a7c317
@ -1,44 +1,35 @@
|
||||
{% if grains['os'] == 'Windows' %}
|
||||
{% set test_false = 'cmd.exe /c exit 1' %}
|
||||
{% set test_true = 'cmd.exe /c exit 0' %}
|
||||
{% elif grains['os'] == 'MacOS' %}
|
||||
{% set test_false = '/usr/bin/false' %}
|
||||
{% set test_true = '/usr/bin/true' %}
|
||||
{% else %}
|
||||
{% set test_false = '/bin/false' %}
|
||||
{% set test_true = '/bin/true' %}
|
||||
{% endif %}
|
||||
|
||||
unless_false_onlyif_true:
|
||||
file.managed:
|
||||
- name: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('test.txt') }}
|
||||
{% if grains['os'] == 'Windows' %}
|
||||
- unless: cmd.exe /c exit 1
|
||||
- onlyif: cmd.exe /c exit 0
|
||||
{% else %}
|
||||
- unless: /bin/false
|
||||
- onlyif: /bin/true
|
||||
{% endif %}
|
||||
- unless: {{ test_false }}
|
||||
- onlyif: {{ test_true }}
|
||||
|
||||
unless_true_onlyif_false:
|
||||
file.managed:
|
||||
- name: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('test.txt') }}
|
||||
{% if grains['os'] == 'Windows' %}
|
||||
- unless: cmd.exe /c exit 0
|
||||
- onlyif: cmd.exe /c exit 1
|
||||
{% else %}
|
||||
- unless: /bin/true
|
||||
- onlyif: /bin/false
|
||||
{% endif %}
|
||||
- unless: {{ test_true }}
|
||||
- onlyif: {{ test_false }}
|
||||
|
||||
unless_true_onlyif_true:
|
||||
file.managed:
|
||||
- name: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('test.txt') }}
|
||||
{% if grains['os'] == 'Windows' %}
|
||||
- unless: cmd.exe /c exit 0
|
||||
- onlyif: cmd.exe /c exit 0
|
||||
{% else %}
|
||||
- unless: /bin/true
|
||||
- onlyif: /bin/true
|
||||
{% endif %}
|
||||
- unless: {{ test_true }}
|
||||
- onlyif: {{ test_true }}
|
||||
|
||||
unless_false_onlyif_false:
|
||||
file.managed:
|
||||
- name: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('test.txt') }}
|
||||
- contents: test
|
||||
{% if grains['os'] == 'Windows' %}
|
||||
- unless: cmd.exe /c exit 1
|
||||
- onlyif: cmd.exe /c exit 1
|
||||
{% else %}
|
||||
- unless: /bin/false
|
||||
- onlyif: /bin/false
|
||||
{% endif %}
|
||||
- unless: {{ test_false }}
|
||||
- onlyif: {{ test_false }}
|
||||
|
Loading…
Reference in New Issue
Block a user