From 0632591996893fe136a1f2fe44d9b9f404f41f3e Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Thu, 1 Nov 2018 13:30:58 +0100 Subject: Initial commit --- fakeenv/README.md | 6 ++++++ fakeenv/bin/virsh | 3 +++ fakeenv/etc/systemd/README.md | 4 ++++ fakeenv/etc/systemd/system/libvirt-guests.service | 11 +++++++++++ fakeenv/etc/systemd/system/libvirtd.service | 11 +++++++++++ fakeenv/etc/systemd/system/lvm2-lvmetad.service | 11 +++++++++++ fakeenv/etc/systemd/system/systemd-timesyncd.service | 11 +++++++++++ fakeenv/usr/README.md | 4 ++++ fakeenv/usr/bin/guestmount | 3 +++ fakeenv/usr/bin/guestunmount | 3 +++ 10 files changed, 67 insertions(+) create mode 100644 fakeenv/README.md create mode 100755 fakeenv/bin/virsh create mode 100644 fakeenv/etc/systemd/README.md create mode 100644 fakeenv/etc/systemd/system/libvirt-guests.service create mode 100644 fakeenv/etc/systemd/system/libvirtd.service create mode 100644 fakeenv/etc/systemd/system/lvm2-lvmetad.service create mode 100644 fakeenv/etc/systemd/system/systemd-timesyncd.service create mode 100644 fakeenv/usr/README.md create mode 100755 fakeenv/usr/bin/guestmount create mode 100755 fakeenv/usr/bin/guestunmount (limited to 'fakeenv') diff --git a/fakeenv/README.md b/fakeenv/README.md new file mode 100644 index 0000000..ed109e8 --- /dev/null +++ b/fakeenv/README.md @@ -0,0 +1,6 @@ +## Content + +This tree contains all files for "faking" the environment required to +successfully test units such as systemd services (e.g. systemd-analyze verify also +checks for the existence of commands or systemd units referenced by a unit we +commit to this repository). diff --git a/fakeenv/bin/virsh b/fakeenv/bin/virsh new file mode 100755 index 0000000..c52d3c2 --- /dev/null +++ b/fakeenv/bin/virsh @@ -0,0 +1,3 @@ +#!/bin/sh + +exit 0 diff --git a/fakeenv/etc/systemd/README.md b/fakeenv/etc/systemd/README.md new file mode 100644 index 0000000..a0690a6 --- /dev/null +++ b/fakeenv/etc/systemd/README.md @@ -0,0 +1,4 @@ +## Content + +Here you'll find fake systemd units and configs to satisfy any test with +`systemd-analyze verify` outside of ../../fakeenv. diff --git a/fakeenv/etc/systemd/system/libvirt-guests.service b/fakeenv/etc/systemd/system/libvirt-guests.service new file mode 100644 index 0000000..6b10a85 --- /dev/null +++ b/fakeenv/etc/systemd/system/libvirt-guests.service @@ -0,0 +1,11 @@ +[Unit] +Description=a nuclear war at the gay bar gay bar gay bar +Requires=local-fs.target + +[Service] +Type=oneshot +ExecStart=/bin/echo NUCELAR WAR +ExecStop=/bin/echo More kittens for everybody + +[Install] +WantedBy=multi-user.target diff --git a/fakeenv/etc/systemd/system/libvirtd.service b/fakeenv/etc/systemd/system/libvirtd.service new file mode 100644 index 0000000..6b10a85 --- /dev/null +++ b/fakeenv/etc/systemd/system/libvirtd.service @@ -0,0 +1,11 @@ +[Unit] +Description=a nuclear war at the gay bar gay bar gay bar +Requires=local-fs.target + +[Service] +Type=oneshot +ExecStart=/bin/echo NUCELAR WAR +ExecStop=/bin/echo More kittens for everybody + +[Install] +WantedBy=multi-user.target diff --git a/fakeenv/etc/systemd/system/lvm2-lvmetad.service b/fakeenv/etc/systemd/system/lvm2-lvmetad.service new file mode 100644 index 0000000..6b10a85 --- /dev/null +++ b/fakeenv/etc/systemd/system/lvm2-lvmetad.service @@ -0,0 +1,11 @@ +[Unit] +Description=a nuclear war at the gay bar gay bar gay bar +Requires=local-fs.target + +[Service] +Type=oneshot +ExecStart=/bin/echo NUCELAR WAR +ExecStop=/bin/echo More kittens for everybody + +[Install] +WantedBy=multi-user.target diff --git a/fakeenv/etc/systemd/system/systemd-timesyncd.service b/fakeenv/etc/systemd/system/systemd-timesyncd.service new file mode 100644 index 0000000..6b10a85 --- /dev/null +++ b/fakeenv/etc/systemd/system/systemd-timesyncd.service @@ -0,0 +1,11 @@ +[Unit] +Description=a nuclear war at the gay bar gay bar gay bar +Requires=local-fs.target + +[Service] +Type=oneshot +ExecStart=/bin/echo NUCELAR WAR +ExecStop=/bin/echo More kittens for everybody + +[Install] +WantedBy=multi-user.target diff --git a/fakeenv/usr/README.md b/fakeenv/usr/README.md new file mode 100644 index 0000000..d407c6c --- /dev/null +++ b/fakeenv/usr/README.md @@ -0,0 +1,4 @@ +## Content + +Here you'll mainly find binaries or libs required by any tested unit outside +../fakeenv such as systemd units. diff --git a/fakeenv/usr/bin/guestmount b/fakeenv/usr/bin/guestmount new file mode 100755 index 0000000..c52d3c2 --- /dev/null +++ b/fakeenv/usr/bin/guestmount @@ -0,0 +1,3 @@ +#!/bin/sh + +exit 0 diff --git a/fakeenv/usr/bin/guestunmount b/fakeenv/usr/bin/guestunmount new file mode 100755 index 0000000..c52d3c2 --- /dev/null +++ b/fakeenv/usr/bin/guestunmount @@ -0,0 +1,3 @@ +#!/bin/sh + +exit 0 -- cgit v1.2.3