~jdstrand/ufw/ufw-xenial

« back to all changes in this revision

Viewing changes to tests/root/live/runtest.sh

  • Committer: Jamie Strandboge
  • Date: 2012-12-04 15:40:10 UTC
  • Revision ID: jamie@canonical.com-20121204154010-hju2cu9pwhm99sxx
update to new upstream 0.33 release
adjust debian/after6.rules.md5sum and debian/before6.rules.md5sum

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
 
3
 
#    Copyright 2008-2009 Canonical Ltd.
 
3
#    Copyright 2008-2012 Canonical Ltd.
4
4
#
5
5
#    This program is free software: you can redistribute it and/or modify
6
6
#    it under the terms of the GNU General Public License version 3,
16
16
 
17
17
source "$TESTPATH/../testlib.sh"
18
18
 
 
19
# This isn't available everywhere, so we will test it later
 
20
sed -i "s/self.caps\['limit'\]\['6'\] = True/self.caps['limit']['6'] = False/" $TESTPATH/lib/python/ufw/backend.py
 
21
 
19
22
for ipv6 in yes no
20
23
do
21
24
        echo "Setting IPV6 to $ipv6" >> $TESTTMP/result
433
436
        grep -A2 "tuple" $TESTSTATE/user6.rules >> $TESTTMP/result
434
437
    done
435
438
done
436
 
 
437
 
do_cmd "0" nostats disable
 
439
do_cmd "0" nostats disable
 
440
 
 
441
echo "Show added" >> $TESTTMP/result
 
442
for ipv6 in yes no
 
443
do
 
444
    echo "Setting IPV6 to $ipv6" >> $TESTTMP/result
 
445
    sed -i "s/IPV6=.*/IPV6=$ipv6/" $TESTPATH/etc/default/ufw
 
446
    do_cmd "0" nostats disable
 
447
    do_cmd "0" nostats enable
 
448
    do_cmd "0" nostats limit 22/tcp
 
449
    if [ "$ipv6" = "yes" ]; then
 
450
        do_cmd "0" nostats allow in on eth0 to 2001::211:aaaa:bbbb:d54c port 123 proto tcp
 
451
    fi
 
452
    do_cmd "0" nostats deny Samba
 
453
    do_cmd "0" show added
 
454
    do_cmd "0" nostats delete limit 22/tcp
 
455
    if [ "$ipv6" = "yes" ]; then
 
456
        do_cmd "0" nostats delete allow in on eth0 to 2001::211:aaaa:bbbb:d54c port 123 proto tcp
 
457
    fi
 
458
    do_cmd "0" nostats delete deny Samba
 
459
    do_cmd "0" show added
 
460
done
 
461
do_cmd "0" nostats disable
 
462
 
438
463
cleanup
439
464
 
440
465
exit 0