st2
st2 copied to clipboard
Restore Pack integration testing
Fixes #6135.
======================================================================
1) ERROR: test_run_with_empty_hostname (test_action_dig.DigActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
tests/test_action_dig.py line 30 in test_run_with_empty_hostname
result = action.run(
TypeError: run() missing 1 required positional argument: 'querytype'
----------------------------------------------------------------------
test_run_with_empty_queryopts (test_action_dig.DigActionTestCase) ... ERROR
======================================================================
2) ERROR: test_run_with_empty_queryopts (test_action_dig.DigActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
tests/test_action_dig.py line 39 in test_run_with_empty_queryopts
results = action.run(
TypeError: run() missing 1 required positional argument: 'querytype'
----------------------------------------------------------------------
test_run_with_empty_querytype (test_action_dig.DigActionTestCase) ... passed
TEST RESULT OUTPUT:
======================================================================
1) ERROR: test_run_with_empty_hostname (test_action_dig.DigActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
tests/test_action_dig.py line 30 in test_run_with_empty_hostname
result = action.run(
TypeError: run() missing 1 required positional argument: 'querytype'
======================================================================
2) ERROR: test_run_with_empty_queryopts (test_action_dig.DigActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
tests/test_action_dig.py line 39 in test_run_with_empty_queryopts
results = action.run(
TypeError: run() missing 1 required positional argument: 'querytype'
packs
pack test failures:
Looks like most (maybe all) of these failing tests needs to be updated to account for the new checkout dir introduced in #5845
======================================================================
1) FAIL: test_run_pack_download (tests.test_action_download.DownloadGitRepoActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
/home/runner/work/st2/st2/virtualenv/lib/python3.8/site-packages/mock/mock.py line 1346 in patched
return func(*newargs, **newkeywargs)
tests/test_action_download.py line 160 in test_run_pack_download
self.clone_from.assert_called_once_with(
/home/runner/work/st2/st2/virtualenv/lib/python3.8/site-packages/mock/mock.py line 926 in assert_called_once_with
return self.assert_called_with(*args, **kwargs)
/home/runner/work/st2/st2/virtualenv/lib/python3.8/site-packages/mock/mock.py line 913 in assert_called_with
raise AssertionError(_error_message()) from cause
AssertionError: expected call not found.
Expected: clone_from('https://github.com/StackStorm-Exchange/stackstorm-test', '/tmp/tmph9t4k1vo/ce654a2592ba0b3d182a1711b41f6f2d')
Actual: clone_from('https://github.com/StackStorm-Exchange/stackstorm-test', '/tmp/tmph9t4k1vo/.st2packs/ce654a2592ba0b3d182a1711b41f6f2d')
======================================================================
2) FAIL: test_run_pack_download_dependencies (tests.test_action_download.DownloadGitRepoActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
/home/runner/work/st2/st2/virtualenv/lib/python3.8/site-packages/mock/mock.py line 1346 in patched
return func(*newargs, **newkeywargs)
tests/test_action_download.py line 183 in test_run_pack_download_dependencies
self.clone_from.assert_any_call(
/home/runner/work/st2/st2/virtualenv/lib/python3.8/site-packages/mock/mock.py line 985 in assert_any_call
raise AssertionError(
AssertionError: clone_from('https://github.com/StackStorm-Exchange/stackstorm-test2', '/tmp/tmpzyax6wk2/020efdb562f2c8cc5c9d7cd03a103b91') call not found
======================================================================
3) FAIL: test_run_pack_download_multiple_packs (tests.test_action_download.DownloadGitRepoActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
/home/runner/work/st2/st2/virtualenv/lib/python3.8/site-packages/mock/mock.py line 1346 in patched
return func(*newargs, **newkeywargs)
tests/test_action_download.py line 213 in test_run_pack_download_multiple_packs
self.clone_from.assert_any_call(
/home/runner/work/st2/st2/virtualenv/lib/python3.8/site-packages/mock/mock.py line 985 in assert_any_call
raise AssertionError(
AssertionError: clone_from('https://github.com/StackStorm-Exchange/stackstorm-test', '/tmp/tmpo03co0hk/ce654a2592ba0b3d182a1711b41f6f2d') call not found
======================================================================
4) FAIL: test_run_pack_download_with_tag (tests.test_action_download.DownloadGitRepoActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
/home/runner/work/st2/st2/virtualenv/lib/python3.8/site-packages/mock/mock.py line 1346 in patched
return func(*newargs, **newkeywargs)
tests/test_action_download.py line 688 in test_run_pack_download_with_tag
self.clone_from.assert_called_once_with(
/home/runner/work/st2/st2/virtualenv/lib/python3.8/site-packages/mock/mock.py line 926 in assert_called_once_with
return self.assert_called_with(*args, **kwargs)
/home/runner/work/st2/st2/virtualenv/lib/python3.8/site-packages/mock/mock.py line 913 in assert_called_with
raise AssertionError(_error_message()) from cause
AssertionError: expected call not found.
Expected: clone_from('https://github.com/StackStorm-Exchange/stackstorm-test', '/tmp/tmp_v3lhsc5/ce654a2592ba0b3d182a1711b41f6f2d')
Actual: clone_from('https://github.com/StackStorm-Exchange/stackstorm-test', '/tmp/tmp_v3lhsc5/.st2packs/ce654a2592ba0b3d182a1711b41f6f2d')
======================================================================
5) FAIL: test_run (tests.test_action_unload.UnloadActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
tests/test_action_unload.py line 88 in test_run
self.assertEqual(len(action_dbs), 1)
AssertionError: 3 != 1
Thelinux.dig
tests probably tests that need to be adjusted due to #5775.
@cognifloyd looks like RabbitMQ's (maybe) having a bad day, any ideas?
I'll also take a look at the tests and the (probably) amqp issue.
Maybe try dropping parallelism to 2: https://github.com/StackStorm/st2/blob/issue-6135-pack-integration-testing-skipped/.circleci%2Fconfig.yml#L11
@cognifloyd finally got tests passing; going to rebase :loading: