Just some more skeleton code

This commit is contained in:
Shay Nehmad 2019-08-27 16:23:09 +03:00
parent c611903baf
commit 0f5f01c4b1
3 changed files with 19 additions and 3 deletions

View File

@ -0,0 +1,2 @@
ISLAND_SERVER_ADDRESS = "1.2.3.4"
ISLAND_SERVER_URL_FORMAT = "https://{IP}/{resource}".format(IP=ISLAND_SERVER_ADDRESS)

View File

@ -0,0 +1 @@
THIS IS AN EXAMPLE FILE.

View File

@ -1,6 +1,9 @@
import pytest
import unittest
import requests
from config import *
class TestMonkeyBlackbox(unittest.TestCase):
@classmethod
@ -11,5 +14,15 @@ class TestMonkeyBlackbox(unittest.TestCase):
def tearDownClass(cls):
print("Killing all GCP machines...")
def test_1_plus_1(self):
assert 1 + 1 == 2
def generic_blackbox_test_case(self, config_file_path, analyzers):
self.load_config_into_server(config_file_path)
self.run_local_monkey_on_island()
for analyzer in analyzers:
assert analyzer.analyze_test_results()
def load_config_into_server(self, config_file_path):
print("uploading {} to {}".format(config_file_path, ISLAND_SERVER_ADDRESS))
def run_local_monkey_on_island(self):
print("Trying to run local monkey on {}".format(ISLAND_SERVER_ADDRESS))
print(requests.get(ISLAND_SERVER_URL_FORMAT.format(resource="api"), verify=False).text)