summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-03-08 16:44:24 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2019-03-12 08:48:36 +0000
commit7898319327d2cfd2c4d319ab185e1a074289c8c3 (patch)
treeb6d2019fe858e178a4650792dbeaf1769d71f184
parent91b08ce7ccef19548c527eccd868ac1523106c7e (diff)
downloadbuildstream-7898319327d2cfd2c4d319ab185e1a074289c8c3.tar.gz
tests/frontend/workspace.py: Remove redundant and pointless 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)