Initial tests
This commit is contained in:
parent
9b76261994
commit
429e2640c1
5 changed files with 57 additions and 0 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
12
plans/example.fmf
Normal file
12
plans/example.fmf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
summary: Essential command line features
|
||||
discover:
|
||||
how: fmf
|
||||
provision:
|
||||
how: local
|
||||
prepare:
|
||||
how: install
|
||||
package: nextcloud
|
||||
environment:
|
||||
PACKAGES: nextcloud
|
||||
execute:
|
||||
how: tmt
|
||||
6
tests/main.fmf
Normal file
6
tests/main.fmf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
contact: Christopher Engelhard <ce@lcts.de>
|
||||
test: ./test.sh
|
||||
framework: beakerlib
|
||||
component: nextcloud
|
||||
duration: 5m
|
||||
tier: 2
|
||||
5
tests/occ/main.fmf
Normal file
5
tests/occ/main.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
summary: Basic test of occ cli
|
||||
description: >-
|
||||
Performs basic tests of Nextcloud's occ CLI utility. Tries to get installation
|
||||
version and status as well as perform post-install tasks using occ.
|
||||
tier: 1
|
||||
33
tests/occ/test.sh
Executable file
33
tests/occ/test.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGES=${PACKAGES:-"nextcloud"}
|
||||
|
||||
installdir="/usr/share/nextcloud"
|
||||
datadir="/var/lib/nextcloud/data"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm --all
|
||||
rlAssertExists "$installdir"
|
||||
rlAssertExists "$datadir"
|
||||
rlRun "pushd $installdir" 0 "Switch to nextcloud directory"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlLog "Testing basic occ functionality"
|
||||
rlRun -s "sudo -u apache php occ status" 0 "Run 'occ status'"
|
||||
rlAssertGrep "versionstring: $VERSION" "$rlRun_LOG"
|
||||
rlAssertGrep "installed: false" "$rlRun_LOG"
|
||||
rlRun -s "sudo -u apache php occ maintenance:install --data-dir=$datadir --admin-pass=admin" 0 "Run 'occ maintenance:install'"
|
||||
rlAssertGrep "successfully installed" "$rlRun_LOG"
|
||||
rlRun -s "sudo -u apache php occ status" 0 "Check install status"
|
||||
rlAssertGrep "installed: true" "$rlRun_LOG"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm $rlRun_LOG"
|
||||
rlRun "popd"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue