forked from greenplum-db/gpdb-archive
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'adb-7.1.0' into ADBDEV-4345
- Loading branch information
Showing
32 changed files
with
891 additions
and
510 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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@minirepro | ||
@minirepro @skip | ||
Feature: Dump minimum database objects that is related to the query | ||
|
||
@minirepro_UI | ||
|
Empty file.
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from behave import fixture | ||
|
||
|
||
@fixture | ||
def init_cluster(context): | ||
context.execute_steps(u""" | ||
Given the database is not running | ||
And a working directory of the test as '/tmp/concourse_cluster' | ||
And the user runs command "rm -rf ~/gpAdminLogs/gpinitsystem*" | ||
And a cluster is created with mirrors on "cdw" and "sdw1, sdw2, sdw3" | ||
""") |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import os | ||
|
||
from behave.formatter.base import Formatter | ||
from behave.model import ScenarioOutline | ||
from behave.model_core import Status | ||
|
||
|
||
def before_scenario(scenario): | ||
pass | ||
|
||
|
||
def after_scenario(scenario): | ||
if scenario.status == Status.failed: | ||
try: | ||
import allure | ||
except ImportError: | ||
pass | ||
else: | ||
if scenario.captured.output: | ||
allure.attach(scenario.captured.output, name="stdout/stderr") | ||
logs_path = os.path.join(os.path.expanduser("~"), "gpAdminLogs") | ||
files = os.listdir(logs_path) | ||
for file in files: | ||
if os.path.isfile(os.path.join(logs_path, file)): | ||
allure.attach.file(os.path.join(logs_path, file), name=file) | ||
|
||
|
||
def wrap_scenario(scenario): | ||
def inner(func): | ||
def wrapped_func(*args, **kwargs): | ||
before_scenario(scenario) | ||
result = func(*args, **kwargs) | ||
after_scenario(scenario) | ||
return result | ||
return wrapped_func | ||
return inner | ||
|
||
|
||
class CustomFormatter(Formatter): | ||
|
||
def _wrap_scenario(self, scenarios): | ||
for scenario in scenarios: | ||
if isinstance(scenario, ScenarioOutline): | ||
self._wrap_scenario(scenario) | ||
else: | ||
scenario.run = wrap_scenario(scenario)(scenario.run) | ||
|
||
def feature(self, feature): | ||
self._wrap_scenario(feature.scenarios) |
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
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
Oops, something went wrong.