Skip to content

Instantly share code, notes, and snippets.

@cjcjameson
Created April 18, 2017 16:47
Show Gist options
  • Save cjcjameson/759aff2c1f70801c35f50dd80cea595f to your computer and use it in GitHub Desktop.
Save cjcjameson/759aff2c1f70801c35f50dd80cea595f to your computer and use it in GitHub Desktop.
Failing Behave test
@gpperfmon
Feature: gpperfmon
@gpperfmon_install
Scenario: install gpperfmon
Given the database "gpperfmon" does not exist
When the user runs "gpperfmon_install --port 15432 --enable --password foo"
Then gpperfmon_install should return a return code of 0
Then verify that the last line of the master postgres configuration file contains the string "gpperfmon_log_alert_level=warning"
And verify that there is a "heap" table "database_history" in "gpperfmon"
@gpperfmon_run
Scenario: run gpperfmon
Given the database "gpperfmon" does not exist
When the user runs "gpperfmon_install --port 15432 --enable --password foo"
Then gpperfmon_install should return a return code of 0
When the user runs command "pkill postgres"
And waiting "5" seconds
And the user runs "gpstart -a"
Then gpstart should return a return code of 0
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/behave/model.py", line 1173, in run
match.run(runner.context)
File "build/bdist.linux-x86_64/egg/behave/model.py", line 1589, in run
self.func(context, *args, **kwargs)
File "/tmp/build/383e956b/gpdb_src/gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py", line 545, in impl
check_return_code(context, ret_code)
File "/tmp/build/383e956b/gpdb_src/gpMgmt/test/behave_utils/utils.py", line 161, in check_return_code
raise Exception("expected return code '%s' does not equal actual return code '%s' %s" % (ret_code, context.ret_code, emsg))
Exception: expected return code '0' does not equal actual return code '1'
Then verify that a role "gpmon" exists in database "gpperfmon"
Then verify that the last line of the master postgres configuration file contains the string "gpperfmon_log_alert_level=warning"
And verify that there is a "heap" table "database_history" in "gpperfmon"
When the user runs command "pgrep gpmmon"
Then pgrep should return a return code of 0
When waiting "5" seconds
When the user runs command "pgrep gpsmon"
Then pgrep should return a return code of 0
Failing scenarios:
test/behave/mgmt_utils/gpperfmon.feature:13 run gpperfmon
0 features passed, 1 failed, 25 skipped
1 scenario passed, 1 failed, 820 skipped
11 steps passed, 1 failed, 8504 skipped, 0 undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment