mirror of
https://github.com/GeekOops/geekoops-next.git
synced 2024-05-19 21:42:22 +00:00
Merge pull request #3 from GeekOops/molecule
Fix molecule for Leap 15.4
This commit is contained in:
commit
6d3bd225cc
|
@ -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/* && rm -f /etc/machine-id /var/lib/dbus/machine-id
|
|
||||||
|
|
||||||
# Start container with systemd
|
|
||||||
ENTRYPOINT ["/usr/sbin/init"]
|
|
|
@ -4,23 +4,12 @@ dependency:
|
||||||
driver:
|
driver:
|
||||||
name: docker
|
name: docker
|
||||||
platforms:
|
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
|
- name: leap15_4
|
||||||
image: registry.opensuse.org/opensuse/leap:15.4
|
image: registry.opensuse.org/opensuse/leap:15.4
|
||||||
dockerfile: Dockerfile.leap15_4
|
dockerfile: Dockerfile.leap15_4
|
||||||
command: ${MOLECULE_DOCKER_COMMAND:-"/usr/sbin/init"}
|
command: ${MOLECULE_DOCKER_COMMAND:-"/usr/sbin/init"}
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
cgroupns: host
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /run
|
- /run
|
||||||
- /tmp
|
- /tmp
|
||||||
|
@ -28,12 +17,6 @@ provisioner:
|
||||||
name: ansible
|
name: ansible
|
||||||
inventory:
|
inventory:
|
||||||
host_vars:
|
host_vars:
|
||||||
leap15_3:
|
|
||||||
leap15_4:
|
leap15_4:
|
||||||
verifier:
|
verifier:
|
||||||
name: testinfra
|
name: testinfra
|
||||||
lint:
|
|
||||||
name: flake8
|
|
||||||
lint: |
|
|
||||||
set -e
|
|
||||||
yamllint .
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(os.environ['MOLEC
|
||||||
def test_pxe(host):
|
def test_pxe(host):
|
||||||
# TODO: Extend the test coverage.
|
# TODO: Extend the test coverage.
|
||||||
tftpboot = "/srv/tftpboot"
|
tftpboot = "/srv/tftpboot"
|
||||||
cmd = host.run("curl -v tftp://127.0.0.1/pxelinux.0 -o /tmp/pxelinux.0")
|
cmd = host.run("curl -v --fail tftp://127.0.0.1/pxelinux.0 -o /tmp/pxelinux.0")
|
||||||
print(cmd.stdout)
|
print(cmd.stdout)
|
||||||
assert cmd.succeeded
|
assert cmd.succeeded
|
||||||
cmd = host.run(f'diff {tftpboot}/pxelinux.0 /tmp/pxelinux.0')
|
cmd = host.run(f'diff {tftpboot}/pxelinux.0 /tmp/pxelinux.0')
|
||||||
|
|
Loading…
Reference in a new issue