File: serverspec

package info (click to toggle)
puppet-module-saz-memcached 8.2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: ruby: 92; sh: 45; makefile: 2
file content (25 lines) | stat: -rwxr-xr-x 677 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

set -e

cleanup () {
    retval=$?
    set +e
    if [ -n "${AUTOPKGTEST_ARTIFACTS}" ]; then
        for f in /etc/memcached.conf /var/log/memcached.log /var/log/puppet-apply.log; do
            [ -f "$f" ] &&  cp "$f" "$AUTOPKGTEST_ARTIFACTS"
        done
        if [ -d /run/systemd/system ]; then
            journalctl -u memcached.service > "${AUTOPKGTEST_ARTIFACTS}/memcached.service.log"
            journalctl -u memcached@11222.service > "${AUTOPKGTEST_ARTIFACTS}/memcached@11222.service.log"
        fi
    fi
    return $retval
}

trap cleanup EXIT

export MEMCACHED_SERVERS="127.0.0.1:11211"

cd debian/tests
rspec --format documentation spec/*_spec.rb