forked from p15670423/monkey
Just some more skeleton code
This commit is contained in:
parent
c611903baf
commit
0f5f01c4b1
|
@ -0,0 +1,2 @@
|
||||||
|
ISLAND_SERVER_ADDRESS = "1.2.3.4"
|
||||||
|
ISLAND_SERVER_URL_FORMAT = "https://{IP}/{resource}".format(IP=ISLAND_SERVER_ADDRESS)
|
|
@ -0,0 +1 @@
|
||||||
|
THIS IS AN EXAMPLE FILE.
|
|
@ -1,6 +1,9 @@
|
||||||
import pytest
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
from config import *
|
||||||
|
|
||||||
|
|
||||||
class TestMonkeyBlackbox(unittest.TestCase):
|
class TestMonkeyBlackbox(unittest.TestCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -11,5 +14,15 @@ class TestMonkeyBlackbox(unittest.TestCase):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
print("Killing all GCP machines...")
|
print("Killing all GCP machines...")
|
||||||
|
|
||||||
def test_1_plus_1(self):
|
def generic_blackbox_test_case(self, config_file_path, analyzers):
|
||||||
assert 1 + 1 == 2
|
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)
|
||||||
|
|
Loading…
Reference in New Issue