st2 icon indicating copy to clipboard operation
st2 copied to clipboard

Restore Pack integration testing

Open mamercad opened this issue 1 year ago • 5 comments

Fixes #6135.

mamercad avatar Feb 13 '24 18:02 mamercad

======================================================================
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'

guzzijones avatar Feb 16 '24 14:02 guzzijones

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

cognifloyd avatar Feb 16 '24 17:02 cognifloyd

Thelinux.dig tests probably tests that need to be adjusted due to #5775.

cognifloyd avatar Feb 16 '24 17:02 cognifloyd

@cognifloyd looks like RabbitMQ's (maybe) having a bad day, any ideas?

mamercad avatar Feb 17 '24 21:02 mamercad

I'll also take a look at the tests and the (probably) amqp issue.

winem avatar Feb 17 '24 23:02 winem

Maybe try dropping parallelism to 2: https://github.com/StackStorm/st2/blob/issue-6135-pack-integration-testing-skipped/.circleci%2Fconfig.yml#L11

cognifloyd avatar Feb 18 '24 18:02 cognifloyd

@cognifloyd finally got tests passing; going to rebase :loading:

mamercad avatar Feb 19 '24 00:02 mamercad