Merge pull request #1166 from guardicore/small_bb_improvements

Small bb improvements
This commit is contained in:
VakarisZ 2021-05-17 14:59:11 +03:00 committed by GitHub
commit ce6b658a15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 10 deletions

View File

@ -11,6 +11,8 @@ In order to execute the entire test suite, you must know the external IP of the
this information in the GCP Console `Compute Engine/VM Instances` under _External IP_.
#### Running in command line
Either run pytest from `/monkey` directory or set `PYTHONPATH` environment variable to
`/monkey` directory so that blackbox tests can import other monkey code.
Blackbox tests have following parameters:
- `--island=IP` Sets island's IP
- `--no-gcp` (Optional) Use for no interaction with the cloud (local test).

View File

@ -159,7 +159,8 @@ class TestMonkeyBlackbox:
return os.path.abspath(LOG_DIR_PATH)
def test_server_online(self, island_client):
assert island_client.get_api_status() is not None
if not island_client.get_api_status():
pytest.exit("BB tests couldn't reach the Island server, quiting.")
def test_ssh_exploiter(self, island_client):
TestMonkeyBlackbox.run_exploitation_test(island_client, Ssh, "SSH_exploiter_and_keys")