Rename scenario to extra_opts indicating flexible use
This commit is contained in:
parent
0a8c460122
commit
3237335b6d
@ -15,8 +15,8 @@ install:
|
|||||||
- pip install docker
|
- pip install docker
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- SCENARIO=folders
|
|
||||||
- SCENARIO=lamp
|
- SCENARIO=lamp
|
||||||
|
- SCENARIO=extra_opts
|
||||||
- SCENARIO=mgt
|
- SCENARIO=mgt
|
||||||
- SCENARIO=multiple
|
- SCENARIO=multiple
|
||||||
- SCENARIO=clients
|
- SCENARIO=clients
|
||||||
|
@ -10,7 +10,7 @@ platforms:
|
|||||||
networks:
|
networks:
|
||||||
- name: ${MOLECULE_SCENARIO_NAME}-borg
|
- name: ${MOLECULE_SCENARIO_NAME}-borg
|
||||||
groups:
|
groups:
|
||||||
- folders
|
- extra_opts
|
||||||
- name: ${MOLECULE_SCENARIO_NAME}-sds
|
- name: ${MOLECULE_SCENARIO_NAME}-sds
|
||||||
hostname: ${MOLECULE_SCENARIO_NAME}-sds
|
hostname: ${MOLECULE_SCENARIO_NAME}-sds
|
||||||
image: debian:stretch
|
image: debian:stretch
|
||||||
@ -42,10 +42,14 @@ provisioner:
|
|||||||
- "/var/cache"
|
- "/var/cache"
|
||||||
borgbackup_exclude:
|
borgbackup_exclude:
|
||||||
- "/var/cache/apt"
|
- "/var/cache/apt"
|
||||||
|
borgbackup_pre_commands:
|
||||||
|
- "dpkg --get-selections"
|
||||||
|
borgbackup_post_commands:
|
||||||
|
- "apt list"
|
||||||
lint:
|
lint:
|
||||||
name: ansible-lint
|
name: ansible-lint
|
||||||
scenario:
|
scenario:
|
||||||
name: folders
|
name: extra_opts
|
||||||
verifier:
|
verifier:
|
||||||
name: testinfra
|
name: testinfra
|
||||||
options:
|
options:
|
17
molecule/generic_files/tests/test_client_extra_opts.py
Normal file
17
molecule/generic_files/tests/test_client_extra_opts.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
testinfra_hosts = ["ansible://extra_opts"]
|
||||||
|
|
||||||
|
|
||||||
|
def test_include_exclude(host):
|
||||||
|
script = host.file("/usr/local/bin/borg-backup")
|
||||||
|
assert script.contains("/var/cache")
|
||||||
|
assert script.contains("--exclude '/var/cache/apt'")
|
||||||
|
assert script.user == "root"
|
||||||
|
assert script.group == "root"
|
||||||
|
|
||||||
|
|
||||||
|
def test_pre_post_commands(host):
|
||||||
|
script = host.file("/usr/local/bin/borg-backup")
|
||||||
|
assert script.contains("dpkg --get-selection")
|
||||||
|
assert script.contains("apt list")
|
||||||
|
assert script.user == "root"
|
||||||
|
assert script.group == "root"
|
@ -1,9 +0,0 @@
|
|||||||
testinfra_hosts = ["ansible://folders"]
|
|
||||||
|
|
||||||
|
|
||||||
def test_include_exclude(host):
|
|
||||||
script = host.file("/usr/local/bin/borg-backup")
|
|
||||||
assert script.contains("/var/cache")
|
|
||||||
assert script.contains("--exclude '/var/cache/apt'")
|
|
||||||
assert script.user == "root"
|
|
||||||
assert script.group == "root"
|
|
Loading…
Reference in New Issue
Block a user