Sha256: bdf4d77f9e02cf8312b4378aa7a0c525dd6e3c88a9bd5cf6246af51d5b9995f6

Contents?: true

Size: 701 Bytes

Versions: 26

Compression:

Stored size: 701 Bytes

Contents

#!/bin/bash

# Process the output of the given file (should contain a plays stdout/err)
# If we pass, return with 0 else return with 1, and print useful output

_file="$1"

# Assert filename has been passed
[ $# -eq 0 ] && { echo "Usage: $0 filename"; exit 1; }

# Assert file exists
[ ! -f "$_file" ] && { echo "$0: $_file file not found."; exit 2; }

# Make sure nothing has changed or failed
grep -q 'changed=0.*failed=0' $_file

# Success condition
if [ $? -eq 0 ]; then
    echo 'Idempotence test: pass'
    exit

# Failure condition, extract useful information and exit
else
    echo 'Idempotence test: fail'
    echo ''
    grep --color=auto -B1 -A1 "\(changed\|failed\):" $_file
    exit 1
fi

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
taperole-2.1.1 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-2.1.0 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-2.0.7 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-2.0.6 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-2.0.5 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-2.0.4 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-2.0.3 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-2.0.2 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-2.0.1 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-2.0.0 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-1.8.2 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-1.8.1 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-1.8.0 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-1.7.1 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-1.7.0 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-1.6.0 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-1.5.5 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-1.5.4 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-1.5.3 vendor/ANXS.postgresql/tests/idempotence_check.sh
taperole-1.5.2 vendor/ANXS.postgresql/tests/idempotence_check.sh