bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

Blame tests/p_gzip/60-zforce-tests

iaind 56c8c8
#!/bin/bash
iaind 56c8c8
# Author: Iain Douglas <centos:1n6.org.uk>
iaind 56c8c8
#
iaind 56c8c8
iaind 56c8c8
# Test zforce - force a .gz extension on all suitable files.
iaind 56c8c8
# Currently doesen't work see
iaind 56c8c8
# http://bugs.centos.org/view.php?id=6096
iaind 56c8c8
#
iaind 56c8c8
iaind 56c8c8
function ExitFail {
iaind 56c8c8
    t_Log "FAIL"
iaind 56c8c8
    exit $FAIL
iaind 56c8c8
}
iaind 56c8c8
iaind 56c8c8
t_Log "Running $0 Testing zforce "
iaind 56c8c8
t_Log "Skipped see http://bugs.centos.org/view.php?id=6096"
iaind 56c8c8
exit 0
iaind 56c8c8
iaind 56c8c8
BASEFILE=/var/tmp/12345678901234
iaind 56c8c8
rm $BASEFILE* &>/dev/null
iaind 56c8c8
iaind 56c8c8
# Create files to work with
iaind 56c8c8
cat <<EOF >$BASEFILE
iaind 56c8c8
Some data to be testing with
iaind 56c8c8
EOF
iaind 56c8c8
iaind 56c8c8
gzip $BASEFILE
iaind 56c8c8
mv $BASEFILE.gz $BASEFILE
iaind 56c8c8
iaind 56c8c8
zforce $BASEFILE || ExitFail
iaind 56c8c8
iaind 56c8c8
[ -e /var/tmp/12345678901234.gz ]
iaind 56c8c8
t_CheckExitStatus $?
iaind 56c8c8
iaind 56c8c8
rm /var/tmp/12345678901234.gz