Add new monitoring test scaffolding.
This commit is contained in:
parent
e963dd228f
commit
cdbc1915ba
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# this test will take hourly, daily and monthly snapshots
|
||||||
|
# for the whole year of 2017 in the timezone Europe/Vienna
|
||||||
|
# sanoid is run hourly and no snapshots are pruned
|
||||||
|
|
||||||
|
. ../common/lib.sh
|
||||||
|
|
||||||
|
POOL_NAME="sanoid-test-1"
|
||||||
|
POOL_TARGET="" # root
|
||||||
|
|
||||||
|
# UTC timestamp of start and end
|
||||||
|
START="1483225200"
|
||||||
|
END="1514761199"
|
||||||
|
|
||||||
|
# prepare
|
||||||
|
setup
|
||||||
|
checkEnvironment
|
||||||
|
disableTimeSync
|
||||||
|
|
||||||
|
# set timezone
|
||||||
|
ln -sf /usr/share/zoneinfo/Europe/Vienna /etc/localtime
|
||||||
|
|
||||||
|
timestamp=$START
|
||||||
|
|
||||||
|
mkdir -p "${POOL_TARGET}"
|
||||||
|
truncate -s 5120M "${POOL_TARGET}"/zpool.img
|
||||||
|
|
||||||
|
zpool create -f "${POOL_NAME}" "${POOL_TARGET}"/zpool.img
|
||||||
|
|
||||||
|
function cleanUp {
|
||||||
|
zpool export "${POOL_NAME}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# export pool in any case
|
||||||
|
trap cleanUp EXIT
|
||||||
|
|
||||||
|
|
|
@ -28,3 +28,10 @@ cp sanoid/sanoid.defaults.conf /etc/sanoid/
|
||||||
cd sanoid/tests/
|
cd sanoid/tests/
|
||||||
./run-tests.sh
|
./run-tests.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Example using LXD VMs ###
|
||||||
|
```
|
||||||
|
VM_NAME=focal-sanoid-test
|
||||||
|
lxc init ubuntu:focal $VM_NAME --vm -c limits.cpu=8 -c limits.memory=10GB
|
||||||
|
|
||||||
|
```
|
Loading…
Reference in New Issue