mirror of
https://github.com/GeekOops/geekoops-pureftpd.git
synced 2024-05-08 01:13:29 +00:00
Merge pull request #3 from GeekOops/molecule
Fix molecule for Leap 15.4
This commit is contained in:
commit
e026d98ada
|
@ -1,7 +0,0 @@
|
|||
FROM registry.opensuse.org/opensuse/leap:15.3
|
||||
|
||||
# Install systemd and development tools, clear cache
|
||||
RUN zypper in -y systemd systemd-sysvinit firewalld python3 python3-firewall curl && rm -rf /var/cache/*
|
||||
|
||||
# Start container with systemd
|
||||
ENTRYPOINT ["/usr/sbin/init"]
|
|
@ -4,23 +4,12 @@ dependency:
|
|||
driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: leap15_3
|
||||
image: registry.opensuse.org/opensuse/leap:15.3
|
||||
dockerfile: Dockerfile.leap15_3
|
||||
command: ${MOLECULE_DOCKER_COMMAND:-"/usr/sbin/init"}
|
||||
privileged: true
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
tmpfs:
|
||||
- /run
|
||||
- /tmp
|
||||
- name: leap15_4
|
||||
image: registry.opensuse.org/opensuse/leap:15.4
|
||||
dockerfile: Dockerfile.leap15_4
|
||||
command: ${MOLECULE_DOCKER_COMMAND:-"/usr/sbin/init"}
|
||||
privileged: true
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
cgroupns: host
|
||||
tmpfs:
|
||||
- /run
|
||||
- /tmp
|
||||
|
@ -28,16 +17,8 @@ provisioner:
|
|||
name: ansible
|
||||
inventory:
|
||||
host_vars:
|
||||
leap15_3:
|
||||
ftp_dir: "/srv/ftp"
|
||||
config_firewall: true
|
||||
leap15_4:
|
||||
ftp_dir: "/srv/ftp"
|
||||
config_firewall: true
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
|
|
|
@ -8,10 +8,10 @@ import os
|
|||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
def test_ftp(host):
|
||||
cmd = host.run("curl -v ftp://127.0.0.1/testfile.txt")
|
||||
cmd = host.run("curl -v --fail ftp://127.0.0.1/testfile.txt")
|
||||
assert cmd.succeeded
|
||||
assert "Happy test file" in cmd.stdout
|
||||
cmd = host.run("curl -v ftp://127.0.0.1/secrets.txt")
|
||||
cmd = host.run("curl -v --fail ftp://127.0.0.1/secrets.txt")
|
||||
assert cmd.failed
|
||||
assert "550" in cmd.stderr
|
||||
|
||||
|
|
Loading…
Reference in a new issue