forked from third-party-mirrors/zfs_autobackup
also test python 2.7
This commit is contained in:
parent
252086e2e6
commit
87e0599130
@ -1,6 +1,7 @@
|
||||
language: python
|
||||
python:
|
||||
- "3.6"
|
||||
- "2.7"
|
||||
before_install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install zfsutils-linux
|
||||
|
@ -4,7 +4,7 @@ import subprocess
|
||||
import random
|
||||
|
||||
#default test stuff
|
||||
import unittest
|
||||
import unittest2
|
||||
import subprocess
|
||||
import time
|
||||
from pprint import *
|
||||
@ -17,7 +17,7 @@ def shelltest(cmd):
|
||||
"""execute and print result as nice copypastable string for unit tests (adds extra newlines on top/bottom)"""
|
||||
ret=(subprocess.check_output(cmd , shell=True).decode('utf-8'))
|
||||
print("######### result of: {}".format(cmd))
|
||||
print(ret,end='')
|
||||
print(ret)
|
||||
print("#########")
|
||||
ret='\n'+ret
|
||||
return(ret)
|
||||
|
@ -2,3 +2,4 @@ colorama
|
||||
argparse
|
||||
coverage==4.5.4
|
||||
python-coveralls
|
||||
unittest2
|
||||
|
@ -16,7 +16,7 @@ if ! [ -e /root/.ssh/id_rsa ]; then
|
||||
ssh -oStrictHostKeyChecking=no localhost true || exit 1
|
||||
fi
|
||||
|
||||
coverage run --source bin.zfs_autobackup -m unittest -v $@
|
||||
coverage run --source bin.zfs_autobackup -m unittest -v
|
||||
EXIT=$?
|
||||
|
||||
echo
|
||||
|
@ -3,7 +3,7 @@ from basetest import *
|
||||
|
||||
print("THIS TEST REQUIRES SSH TO LOCALHOST")
|
||||
|
||||
class TestExecuteNode(unittest.TestCase):
|
||||
class TestExecuteNode(unittest2.TestCase):
|
||||
|
||||
# def setUp(self):
|
||||
|
||||
|
@ -11,11 +11,11 @@ class Thing:
|
||||
return("{}".format(time.strftime("%Y-%m-%d %H:%M:%S",struct)))
|
||||
|
||||
|
||||
class TestThinner(unittest.TestCase):
|
||||
class TestThinner(unittest2.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
# def setUp(self):
|
||||
|
||||
return super().setUp()
|
||||
# return super().setUp()
|
||||
|
||||
def test_incremental(self):
|
||||
ok=['2023-01-01 10:09:50',
|
||||
|
@ -1,11 +1,11 @@
|
||||
from basetest import *
|
||||
|
||||
|
||||
class TestZfsAutobackup(unittest.TestCase):
|
||||
class TestZfsAutobackup(unittest2.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
prepare_zpools()
|
||||
return super().setUp()
|
||||
# return super(TestZfsAutobackup,self).setUp()
|
||||
|
||||
def test_defaults(self):
|
||||
with self.subTest("defaults with full verbose and debug"):
|
||||
|
@ -1,11 +1,11 @@
|
||||
from basetest import *
|
||||
|
||||
|
||||
class TestZfsNode(unittest.TestCase):
|
||||
class TestZfsNode(unittest2.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
prepare_zpools()
|
||||
return super().setUp()
|
||||
# return super().setUp()
|
||||
|
||||
|
||||
def test_consistent_snapshot(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user