From 94d414b39e73bdfe3c5cf37f94edf7f3c8db6502 Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Tue, 16 Aug 2016 12:46:11 +0000 Subject: [PATCH] revert back to trial from nosetests --- .travis.yml | 2 +- cowrie/test/test_base_commands.py | 6 +++--- cowrie/test/unittests.cfg | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a1e981..5eef0cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,4 +15,4 @@ before_install: # command to install dependencies install: "pip install -r requirements.txt" # command to run tests -script: nosetests +script: trial cowrie diff --git a/cowrie/test/test_base_commands.py b/cowrie/test/test_base_commands.py index 78b8ccf..d8c6115 100644 --- a/cowrie/test/test_base_commands.py +++ b/cowrie/test/test_base_commands.py @@ -13,7 +13,7 @@ from . 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 14f2691..33dde8c 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. @@ -75,7 +75,7 @@ filesystem_file = data/fs.pickle # In addition to this, the file must exist in the virtual filesystem # # (default: txtcmds) -txtcmds_path = txtcmds +txtcmds_path = ../txtcmds # Maximum file size (in bytes) for downloaded files to be stored in 'download_path'.