generated from cisagov/ScubaGear
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build out structure for initial smoke test
- Loading branch information
1 parent
ac2f940
commit 6dbffbf
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
""" | ||
run_smoke_test.py is a test script to verify `scubagoggles gws` | ||
outputs (i.e., files) are generated. | ||
""" | ||
|
||
import pytest | ||
import subprocess | ||
|
||
""" | ||
Test virtualenv setup, activation | ||
Test installing dependencies for running scuba.py script | ||
Test installing dependencies for running scubagoggles directly | ||
""" | ||
|
||
class TestScuba: | ||
#def test_venv_setup(self): | ||
# command = f"scubagoggles gws " | ||
# result = subprocess.run(command, shell=True) | ||
# print(result.stdout) | ||
# print(result.stderr) | ||
|
||
|
||
def test_cli(self): | ||
command = f"scubagoggles gws --subjectemail [email protected] --quiet" | ||
result = subprocess.run(command) | ||
print(result) | ||
print(result.stderr) | ||
|
||
if result.returncode != 0: | ||
raise AssertionError(f"Expected 0, but got {result.returncode}") | ||
|
||
|
||
#def create_venv(env): | ||
# result = subprocess.run(["python", "-m", "venv", env]) | ||
# if result.returncode == 0: | ||
# raise RuntimeError(f"Failed to create virtual environment, {result.stderr}") | ||
# | ||
#def activate_venv(env): | ||
# command = f"{env}\\Scripts\\activate" | ||
# result = subprocess.run(command) | ||
# if result.returncode == 0: | ||
# raise RuntimeError(f"Failed to activate virtual environment, {result.stderr}") |