diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/test-of-functionality-of-crontabs/main.fmf b/tests/test-of-functionality-of-crontabs/main.fmf new file mode 100644 index 0000000..30aff61 --- /dev/null +++ b/tests/test-of-functionality-of-crontabs/main.fmf @@ -0,0 +1,12 @@ +summary: test of functionality of crontabs +description: '' +contact: Petr Sklenar +component: + - crontabs +test: ./runtest.sh +framework: beakerlib +recommend: + - crontabs +duration: 30m +extra-summary: /CoreOS/crontabs/Sanity/test-of-functionality-of-crontabs +extra-task: /CoreOS/crontabs/Sanity/test-of-functionality-of-crontabs diff --git a/tests/test-of-functionality-of-crontabs/runtest.sh b/tests/test-of-functionality-of-crontabs/runtest.sh old mode 100644 new mode 100755 index 98548b2..0090593 --- a/tests/test-of-functionality-of-crontabs/runtest.sh +++ b/tests/test-of-functionality-of-crontabs/runtest.sh @@ -27,8 +27,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include rhts environment -. /usr/bin/rhts-environment.sh -. /usr/lib/beakerlib/beakerlib.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="crontabs" #how long should we wait: @@ -39,6 +38,7 @@ rlJournalStart user="petr$RANDOM" rlRun "rm -rf /tmp/test.createdbypetr /tmp/test.createdbyroot" 0 "Removing tmp directory" rlRun "useradd $user" + rlRun "rlServiceStart crond" rlFileBackup /etc/crontab rlPhaseEnd @@ -76,7 +76,8 @@ rlJournalStart rlPhaseStartCleanup rlRun "rm -rf /tmp/test.createdbypetr /tmp/test.createdbyroot" 0 "Removing tmp directory" - rlRun "userdel -r $user" + rlRun "userdel -rf $user" + rlRun "rlServiceRestore crond" rlFileRestore rlPhaseEnd rlJournalPrintText diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 22f9d4d..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# This first play always runs on the local staging system -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - tests: - - test-of-functionality-of-crontabs - required_packages: - - crontabs # test-of-functionality-of-crontabs needs crontabs - - findutils # beakerlib needs find command