summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-03-08 16:44:24 +0900
committerbst-marge-bot <marge-bot@buildstream.build>2019-03-09 08:42:21 +0000
commitc8dbbf570c5cb85aeb51e408b4a65f0ef0f500f9 (patch)
tree4720d001529c55f9d4e5f0663409d556822bf52b
parentf85c9a6ab25fe2b2767fdd8480449cd77132323c (diff)
downloadbuildstream-tristan/cleanup-workspace-tests.tar.gz
tests/frontend/workspace.py: Remove redundant and pointless teststristan/cleanup-workspace-tests
The following tests all test core functionalities for which the plugin type cannot possibly have any effects on the result, because none of the tested functionalities in these tests are delegated to plugins in anyway: - test_open_track - test_open_force - test_open_force_open - test_open_force_different_workspace - test_close - test_inconsitent_pipeline_message Reduced these tests to only test with the git plugin, instead of redundantly running these tests against every plugin.
-rw-r--r--tests/frontend/workspace.py32
1 files changed, 13 insertions, 19 deletions
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index 0e834912c..6760b101c 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -317,15 +317,13 @@ def test_open_defaultlocation_exists(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("kind", repo_kinds)
-def test_open_track(cli, tmpdir, datafiles, kind):
- open_workspace(cli, tmpdir, datafiles, kind, True)
+def test_open_track(cli, tmpdir, datafiles):
+ open_workspace(cli, tmpdir, datafiles, 'git', True)
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("kind", repo_kinds)
-def test_open_force(cli, tmpdir, datafiles, kind):
- element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, kind, False)
+def test_open_force(cli, tmpdir, datafiles):
+ element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, 'git', False)
# Close the workspace
result = cli.run(project=project, args=[
@@ -344,9 +342,8 @@ def test_open_force(cli, tmpdir, datafiles, kind):
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("kind", repo_kinds)
-def test_open_force_open(cli, tmpdir, datafiles, kind):
- element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, kind, False)
+def test_open_force_open(cli, tmpdir, datafiles):
+ element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, 'git', False)
# Assert the workspace dir exists
assert os.path.exists(workspace)
@@ -359,9 +356,8 @@ def test_open_force_open(cli, tmpdir, datafiles, kind):
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("kind", repo_kinds)
-def test_open_force_different_workspace(cli, tmpdir, datafiles, kind):
- element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, kind, False, "-alpha")
+def test_open_force_different_workspace(cli, tmpdir, datafiles):
+ element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, 'git', False, "-alpha")
# Assert the workspace dir exists
assert os.path.exists(workspace)
@@ -371,7 +367,7 @@ def test_open_force_different_workspace(cli, tmpdir, datafiles, kind):
tmpdir = os.path.join(str(tmpdir), "-beta")
shutil.move(hello_path, hello1_path)
- element_name2, project2, workspace2 = open_workspace(cli, tmpdir, datafiles, kind, False, "-beta")
+ element_name2, project2, workspace2 = open_workspace(cli, tmpdir, datafiles, 'git', False, "-beta")
# Assert the workspace dir exists
assert os.path.exists(workspace2)
@@ -396,9 +392,8 @@ def test_open_force_different_workspace(cli, tmpdir, datafiles, kind):
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("kind", repo_kinds)
-def test_close(cli, tmpdir, datafiles, kind):
- element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, kind, False)
+def test_close(cli, tmpdir, datafiles):
+ element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, 'git', False)
# Close the workspace
result = cli.run(project=project, args=[
@@ -968,9 +963,8 @@ def test_list_supported_workspace(cli, tmpdir, datafiles, workspace_cfg, expecte
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("kind", repo_kinds)
-def test_inconsitent_pipeline_message(cli, tmpdir, datafiles, kind):
- element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, kind, False)
+def test_inconsitent_pipeline_message(cli, tmpdir, datafiles):
+ element_name, project, workspace = open_workspace(cli, tmpdir, datafiles, 'git', False)
shutil.rmtree(workspace)