From e7b760f1aa07e3a0d93cb7b40555ba030a3a6811 Mon Sep 17 00:00:00 2001 From: Kalen Krempely Date: Mon, 25 Mar 2019 17:30:19 -0700 Subject: [PATCH] gpaddmirrors: split tests into local and remote Tag existing tests with @demo_cluster and @concourse_cluster annotations. The @demo_cluster tag denotes the scenario can run locally. The @concourse_cluster tag denotes the scenario that requires a remote cluster. Co-authored-by: Jamie McAtamney Authored-by: Kalen Krempely (cherry picked from commit 735da14f4cb4ce27f623a947659213e4f8fc4bca) --- concourse/pipelines/templates/gpdb-tpl.yml | 44 ++----------------- .../behave/mgmt_utils/gpaddmirrors.feature | 15 ++++--- 2 files changed, 14 insertions(+), 45 deletions(-) diff --git a/concourse/pipelines/templates/gpdb-tpl.yml b/concourse/pipelines/templates/gpdb-tpl.yml index 069bf99e54..f33305eaba 100644 --- a/concourse/pipelines/templates/gpdb-tpl.yml +++ b/concourse/pipelines/templates/gpdb-tpl.yml @@ -30,7 +30,10 @@ {'name': 'gpcheckcat', 'use_concourse_cluster': true}, {'name': 'gprecoverseg', - 'use_concourse_cluster': true} + 'use_concourse_cluster': true}, + {'name': 'gpaddmirrors', + 'use_concourse_cluster': true, + 'additional_ccp_vars': 'number_of_nodes: 4'}, ] %} ## ====================================================================== @@ -125,7 +128,6 @@ groups: {% for test in CLI_TESTS %} - [[ test.name ]] {% endfor %} - - gpaddmirrors - gpexpand - check_centos {% endif %} @@ -301,7 +303,6 @@ groups: {% for test in CLI_TESTS %} - [[ test.name ]] {% endfor %} - - gpaddmirrors - gpexpand - check_centos - compile_gpdb_centos6 @@ -1845,42 +1846,6 @@ jobs: params: TEST_OS: centos -- name: gpaddmirrors - plan: - - aggregate: - - get: gpdb_src - params: - submodules: - - gpMgmt/bin/pythonSrc/ext - passed: [gate_cli_start] - - get: gpdb_binary - resource: bin_gpdb_centos6 - passed: [gate_cli_start] - trigger: [[ test_trigger ]] - - get: ccp_src - - get: ccp-image - - put: terraform - params: - <<: *ccp_default_params - vars: - <<: *ccp_default_vars - number_of_nodes: 4 - - task: gen_cluster - file: ccp_src/ci/tasks/gen_cluster.yml - params: - <<: *ccp_gen_cluster_default_params - - task: gpinitsystem - file: ccp_src/ci/tasks/gpinitsystem.yml - - task: run_tests - file: gpdb_src/concourse/tasks/run_behave.yml - image: ccp-image - params: - BEHAVE_FLAGS: --tags=gpaddmirrors - on_success: - <<: *ccp_destroy - ensure: - <<: *set_failed - {% for test in CLI_TESTS %} - name: [[ test.name ]] plan: @@ -2224,7 +2189,6 @@ jobs: ## - MADlib_Test_orca_centos7 ## - MADlib_Test_planner_centos7 - pg_upgrade - - gpaddmirrors - gpexpand - check_centos - interconnect diff --git a/gpMgmt/test/behave/mgmt_utils/gpaddmirrors.feature b/gpMgmt/test/behave/mgmt_utils/gpaddmirrors.feature index ab5ce20af1..a21ab8d70e 100644 --- a/gpMgmt/test/behave/mgmt_utils/gpaddmirrors.feature +++ b/gpMgmt/test/behave/mgmt_utils/gpaddmirrors.feature @@ -1,6 +1,10 @@ @gpaddmirrors Feature: Tests for gpaddmirrors +########################### @concourse_cluster tests ########################### +# The @concourse_cluster tag denotes the scenario that requires a remote cluster + + @concourse_cluster Scenario: gprecoverseg works correctly on a newly added mirror Given a working directory of the test as '/tmp/gpaddmirrors' And the database is killed on hosts "mdw,sdw1,sdw2" @@ -15,6 +19,7 @@ Feature: Tests for gpaddmirrors And the segments are synchronized And the user runs "gpstop -aqM fast" + @concourse_cluster Scenario: gpaddmirrors puts mirrors on the same hosts when there is a standby configured Given a working directory of the test as '/tmp/gpaddmirrors' And the database is killed on hosts "mdw,sdw1,sdw2,sdw3" @@ -30,8 +35,7 @@ Feature: Tests for gpaddmirrors Then mirror hostlist matches the one saved in context And the user runs "gpstop -aqM fast" - # This test requires a bigger cluster than the other gpaddmirrors tests. - @gpaddmirrors_spread + @concourse_cluster Scenario: gpaddmirrors puts mirrors on different host Given a working directory of the test as '/tmp/gpaddmirrors' And the database is killed on hosts "mdw,sdw1,sdw2,sdw3" @@ -40,6 +44,7 @@ Feature: Tests for gpaddmirrors Then verify that mirror segments are in "spread" configuration And the user runs "gpstop -aqM fast" + @concourse_cluster Scenario: gpaddmirrors with a default master data directory Given a working directory of the test as '/tmp/gpaddmirrors' And the database is killed on hosts "mdw,sdw1" @@ -48,7 +53,7 @@ Feature: Tests for gpaddmirrors Then verify the database has mirrors And the user runs "gpstop -aqM fast" - @gpaddmirrors_temp_directory + @concourse_cluster Scenario: gpaddmirrors with a given master data directory [-d ] Given a working directory of the test as '/tmp/gpaddmirrors' And the database is killed on hosts "mdw,sdw1" @@ -57,7 +62,7 @@ Feature: Tests for gpaddmirrors Then verify the database has mirrors And the user runs "gpstop -aqM fast" - @gpaddmirrors_mirrors_restart + @concourse_cluster Scenario: gpaddmirrors mirrors are recognized after a cluster restart Given a working directory of the test as '/tmp/gpaddmirrors' And the database is killed on hosts "mdw,sdw1" @@ -73,7 +78,7 @@ Feature: Tests for gpaddmirrors And the segments are synchronized And the user runs "gpstop -aqM fast" - @gpaddmirrors_workload + @concourse_cluster Scenario: gpaddmirrors when the primaries have data Given a working directory of the test as '/tmp/gpaddmirrors' And the database is killed on hosts "mdw,sdw1" -- GitLab