diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..86b5eac --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: python +python: + - "2.6" + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + - "3.5-dev" # 3.5 development branch + - "nightly" # currently points to 3.6-dev +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/cowrie/test/test_base_commands.py b/cowrie/test/test_base_commands.py index 606adf4..1695070 100644 --- a/cowrie/test/test_base_commands.py +++ b/cowrie/test/test_base_commands.py @@ -13,7 +13,7 @@ import fake_transport class ShellBaseCommandsTests(unittest.TestCase): def setUp(self): - self.cfg = config.readConfigFile("../cowrie/test/unittests.cfg") + self.cfg = config.readConfigFile("cowrie/test/unittests.cfg") self.proto = protocol.HoneyPotInteractiveProtocol \ (fake_server.FakeAvatar(fake_server.FakeServer(self.cfg))) self.tr = fake_transport.FakeTransport("1.1.1.1", "1111") @@ -203,7 +203,7 @@ class ShellBaseCommandsTests(unittest.TestCase): class ShellFileCommandsTests(unittest.TestCase): def setUp(self): - self.cfg = config.readConfigFile("../cowrie/test/unittests.cfg") + self.cfg = config.readConfigFile("cowrie/test/unittests.cfg") self.proto = protocol.HoneyPotInteractiveProtocol( fake_server.FakeAvatar(fake_server.FakeServer(self.cfg))) self.tr = fake_transport.FakeTransport("1.1.1.1", "1111") @@ -277,7 +277,7 @@ class ShellFileCommandsTests(unittest.TestCase): class ShellPipeCommandsTests(unittest.TestCase): def setUp(self): - self.cfg = config.readConfigFile("../cowrie/test/unittests.cfg") + self.cfg = config.readConfigFile("cowrie/test/unittests.cfg") self.proto = protocol.HoneyPotInteractiveProtocol( fake_server.FakeAvatar(fake_server.FakeServer(self.cfg))) self.tr = fake_transport.FakeTransport("1.1.1.1", "1111") diff --git a/cowrie/test/unittests.cfg b/cowrie/test/unittests.cfg index 8380a26..14f2691 100644 --- a/cowrie/test/unittests.cfg +++ b/cowrie/test/unittests.cfg @@ -41,7 +41,7 @@ internet_facing_ip = 111.111.111.111 # Directory for miscellaneous data files, such as the password database. # # (default: data_path) -data_path = ../data +data_path = data # Directory where virtual file contents are kept in. @@ -51,7 +51,7 @@ data_path = ../data # actual virtual filesystem is kept in filesystem_file (see below) # # (default: honeyfs) -contents_path = ../honeyfs +contents_path = honeyfs # File in the python pickle format containing the virtual filesystem. @@ -61,7 +61,7 @@ contents_path = ../honeyfs # a real template linux installation. # # (default: fs.pickle) -filesystem_file = ../data/fs.pickle +filesystem_file = data/fs.pickle # Directory for creating simple commands that only output text.