Skip to content

Commit

Permalink
get latest created GWSBaselineConformance dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelbaker-cisa committed Jul 5, 2024
1 parent 6dbffbf commit 5f0a90d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Testing/Functional/SmokeTests/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pytest
import subprocess
import os

"""
Test virtualenv setup, activation
Expand All @@ -23,14 +24,21 @@ class TestScuba:
# print(result.stderr)


def test_cli(self):
command = f"scubagoggles gws --subjectemail [email protected] --quiet"
def test_cli(self, subjectemail):
command = f"scubagoggles gws --subjectemail {subjectemail} --quiet -b commoncontrols"
result = subprocess.run(command)
print(result)
print(result.stderr)

if result.returncode != 0:
raise AssertionError(f"Expected 0, but got {result.returncode}")

cwd = os.getcwd()
print(cwd)
prefix = "GWSBaselineConformance"

directories = [d for d in os.listdir() if os.path.isdir(d) and d.startswith(prefix)]
directories.sort(key=lambda d: os.path.getctime(d), reverse=True)
print(directories)
print(directories[0])


#def create_venv(env):
Expand Down
8 changes: 8 additions & 0 deletions Testing/Functional/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest

def pytest_addoption(parser):
parser.addoption("--subjectemail", action="store")

@pytest.fixture
def subjectemail(pytestconfig):
return pytestconfig.getoption("subjectemail")

0 comments on commit 5f0a90d

Please sign in to comment.