Skip to content

test(integration): add live test harness and Exchange scan test - #234

Open
rsmanasa-google wants to merge 1 commit into
test/integration-redactionfrom
test/integration-exchange
Open

rsmanasa-google wants to merge 1 commit into
test/integration-redactionfrom
test/integration-exchange

Conversation

@rsmanasa-google

Copy link
Copy Markdown
Collaborator

Adds the shared harness and the runner that starts a planner scan without clicks, in a child process, from an uploaded CSV naming one user. Adds the first test that uses them: an Exchange scan against a real Microsoft 365 tenant, checking that the scan completes without errors, the run log is clean, and the report and batch CSVs are written. Counts and ETAs are not compared.

The test is skipped unless credentials and a scan inputs file are provided.

def load_scan_inputs() -> Dict[str, Any]:
"""Returns the scan inputs file contents, or {} when there is none."""
path = os.environ.get(SCAN_INPUTS_ENV) or DEFAULT_SCAN_INPUTS
if not os.path.exists(path):
path = os.environ.get(SCAN_INPUTS_ENV) or DEFAULT_SCAN_INPUTS
if not os.path.exists(path):
return {}
with open(path, encoding="utf-8") as f:
path = os.path.join(target, name)
if not os.path.exists(path):
_restored_files.append(path) # Only files the tests put there are removed afterwards.
shutil.copyfile(os.path.join(source, name), path)
Adds the shared harness and the runner that starts a planner scan without
clicks, in a child process, from an uploaded CSV naming one user. Adds the
first test that uses them: an Exchange scan against a real Microsoft 365
tenant, checking that the scan completes without errors, the run log is
clean, and the report and batch CSVs are written. Counts and ETAs are not
compared.

The test is skipped unless credentials and a scan inputs file are provided.
@rsmanasa-google
rsmanasa-google force-pushed the test/integration-exchange branch from 4943095 to 44a9bce Compare November 30, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants