-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update e2e test to use new commands
- Loading branch information
Showing
3 changed files
with
24 additions
and
15 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
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 |
---|---|---|
|
@@ -36,8 +36,8 @@ | |
"success/happy path", | ||
{ | ||
"branch": "test", | ||
"markdown-path": "md_comp", | ||
"rules-view-path": RULES_VIEW_DIR, | ||
"markdown-dir": "md_comp", | ||
"rules-view-dir": RULES_VIEW_DIR, | ||
"committer-name": "test", | ||
"committer-email": "[email protected]", | ||
}, | ||
|
@@ -46,8 +46,8 @@ | |
"success/happy path with model skipping", | ||
{ | ||
"branch": "test", | ||
"rules-view-path": RULES_VIEW_DIR, | ||
"markdown-path": "md_comp", | ||
"rules-view-dir": RULES_VIEW_DIR, | ||
"markdown-dir": "md_comp", | ||
"committer-name": "test", | ||
"committer-email": "test", | ||
"skip-items": test_comp_name, | ||
|
@@ -101,7 +101,7 @@ def test_rules_transform_e2e( | |
"component-title": "test-comp", | ||
"compdef-name": "test-compdef", | ||
"component-description": "test", | ||
"markdown-path": "markdown", | ||
"markdown-dir": "markdown", | ||
"branch": "test", | ||
"committer-name": "test", | ||
"committer-email": "[email protected]", | ||
|
@@ -114,7 +114,7 @@ def test_rules_transform_e2e( | |
"component-title": "test-comp", | ||
"compdef-name": "test-compdef", | ||
"component-description": "test", | ||
"markdown-path": "markdown", | ||
"markdown-dir": "markdown", | ||
"branch": "test", | ||
"committer-name": "test", | ||
"committer-email": "[email protected]", | ||
|
@@ -129,7 +129,7 @@ def test_create_cd_e2e( | |
test_name: str, | ||
command_args: Dict[str, str], | ||
) -> None: | ||
"""Test the trestlebot create-cd command.""" | ||
"""Test the trestlebot create compdef command.""" | ||
logger.info(f"Running test: {test_name}") | ||
|
||
tmp_repo_str, _ = tmp_repo | ||
|
@@ -139,7 +139,9 @@ def test_create_cd_e2e( | |
_ = setup_for_profile(tmp_repo_path, test_prof, "") | ||
load_from_json(tmp_repo_path, test_filter_prof, test_filter_prof, Profile) | ||
|
||
command = e2e_runner.build_test_command(tmp_repo_str, "create-cd", command_args) | ||
command = e2e_runner.build_test_command( | ||
tmp_repo_str, "create compdef", command_args | ||
) | ||
exit_code, _, _ = e2e_runner.invoke_command(command, tmp_repo_path) | ||
assert exit_code == SUCCESS_EXIT_CODE | ||
|
||
|
@@ -151,7 +153,7 @@ def test_create_cd_e2e( | |
FileContentType.JSON, | ||
) | ||
assert comp_path.exists() | ||
assert (tmp_repo_path / command_args["markdown-path"]).exists() | ||
assert (tmp_repo_path / command_args["markdown-dir"]).exists() | ||
assert ( | ||
tmp_repo_path | ||
/ RULES_VIEW_DIR | ||
|
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 |
---|---|---|
|
@@ -47,11 +47,11 @@ | |
def valid_args_dict() -> Dict[str, str]: | ||
return { | ||
"branch": "test", | ||
"markdown-path": test_ssp_md, | ||
"markdown-dir": test_ssp_md, | ||
"oscal-model": "ssp", | ||
"committer-name": "test", | ||
"committer-email": "[email protected]", | ||
"ssp-index": "ssp-index.json", | ||
"ssp-index-file": "ssp-index.json", | ||
} | ||
|
||
|
||
|
@@ -87,12 +87,12 @@ def test_ssp_editing_e2e( | |
|
||
# Get command arguments for the test | ||
branch = valid_args_dict["branch"] | ||
markdown_path = valid_args_dict["markdown-path"] | ||
markdown_path = valid_args_dict["markdown-dir"] | ||
committer_name = valid_args_dict["committer-name"] | ||
committer_email = valid_args_dict["committer-email"] | ||
|
||
create_args: Dict[str, str] = { | ||
"markdown-path": markdown_path, | ||
"markdown-dir": markdown_path, | ||
"branch": branch, | ||
"committer-name": committer_name, | ||
"committer-email": committer_email, | ||
|
@@ -102,7 +102,7 @@ def test_ssp_editing_e2e( | |
} | ||
create_command = e2e_runner.build_test_command( | ||
tmp_repo_str, | ||
"create-ssp", | ||
"create ssp", | ||
create_args, | ||
) | ||
exit_code, _, _ = e2e_runner.invoke_command(create_command) | ||
|