Merge pull request #4 from GeekOops/molecule

Fix molecule for Leap 15.4
This commit is contained in:
Felix Niederwanger 2023-01-30 16:43:42 +01:00 committed by GitHub
commit 4523160a55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 27 deletions

View file

@ -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"]

View file

@ -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,14 +17,7 @@ provisioner:
name: ansible
inventory:
host_vars:
leap15_3:
influxdb: true
leap15_4:
influxdb: true
verifier:
name: testinfra
lint:
name: flake8
lint: |
set -e
yamllint .

View file

@ -8,7 +8,7 @@ import os
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_grafana_http(host):
cmd = host.run("curl -v http://127.0.0.1:3000")
cmd = host.run("curl -v --fail http://127.0.0.1:3000")
assert cmd.succeeded
assert "/login" in cmd.stdout
assert "Found" in cmd.stdout