Commit graph

142 commits

Author SHA1 Message Date
Pedro Algarvio
ae36b15f85 Replace the @slowTest decorator with the slow_test pytest marker 2020-12-31 09:27:51 +00:00
Pedro Algarvio
cb92560b1d Fix the salt_ssh_cli fixture 2020-12-03 15:38:00 +00:00
Pedro Algarvio
2f7fb31195 The file_tree ext pillar now has a fixture for it's root path 2020-12-03 15:38:00 +00:00
Pedro Algarvio
ccabafd386 Set the test daemons log file level to error. We already forward logs to pytest. 2020-11-20 07:00:46 +00:00
Pedro Algarvio
92dcd96d82 Skip tests depending on the ssl_webserver fixture if on Py < 3.5.3 2020-10-08 18:59:47 +01:00
Pedro Algarvio
491a03382d PyTest now uses argparse. 2020-10-08 07:50:23 +01:00
Megan Wilhite
735a007785 Pass in protocol to ssl context 2020-10-08 04:18:50 +01:00
Pedro Algarvio
0a8bedd2ae
Fix PyTest's tests integration files copy 2020-09-29 05:57:04 +01:00
Megan Wilhite
2629d4f93d fix pre-commit 2020-09-25 16:26:26 -07:00
ch3ll
08dd367ca8 Add verify_ssl to file.managed state 2020-09-25 16:26:26 -07:00
Pedro Algarvio
002be06465
We need to set_path for macOS, see #56627 for more info 2020-09-14 12:50:51 +01:00
Pedro Algarvio
be73058bb9
Merge pull request #58450 from s0undt3ch/hotfix/pytest-migration-4
[PyTest Migration] Untangle shell tests
2020-09-14 12:39:38 +01:00
Pedro Algarvio
b536d2dc85
Untangle test/integration/shell/test_proxy.py 2020-09-14 11:03:28 +01:00
Pedro Algarvio
3a510e541d
Migrate proxy tests to PyTest 2020-09-14 11:00:39 +01:00
Pedro Algarvio
0aba49c7d3
Bump pytest-salt-factories to 0.92.x 2020-09-14 07:55:09 +01:00
Pedro Algarvio
fe66dd67f9
Bump PyTest to 6.0.1 2020-09-02 12:34:06 +01:00
Pedro Algarvio
5804ce3c47
Drop our custom mark evaluator
Refs https://github.com/pytest-dev/pytest/pull/7695
2020-09-02 12:34:06 +01:00
Pedro Algarvio
47280a542b
Less intrusive control over package scoped fixtures 2020-09-02 12:34:06 +01:00
Pedro Algarvio
569a99cf46
Never mix unittest and pytest tests 2020-09-02 12:34:05 +01:00
Pedro Algarvio
43b23f7744
Fix windows unit test white listing under PyTest 2020-09-02 12:34:05 +01:00
Pedro Algarvio
d9091b48b8
Import the pytest fixtures on the "main" conftest.py 2020-09-02 12:34:05 +01:00
Pedro Algarvio
895aa5f372
We should not mess with module, class or function scoped fixtures 2020-08-25 15:10:43 +01:00
Pedro Algarvio
3651e5d159
Extend the salt-factories compatability layer 2020-08-25 15:07:34 +01:00
Pedro Algarvio
bb527a13ad Pass along the log server settings to salt_factories_config fixture 2020-08-24 15:09:24 -07:00
Pedro Algarvio
de2fde5d3b Resolve paths when checking from filenames functionality.
This change fixes the following error seen on windows:
```
Traceback (most recent call last):
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\_pytest\main.py", line 206, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\_pytest\main.py", line 249, in _main
    config.hook.pytest_collection(session=session)
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\pluggy\hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\pluggy\manager.py", line 92, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\pluggy\manager.py", line 86, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\pluggy\callers.py", line 208, in _multicall
    return outcome.get_result()
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\pluggy\callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\pluggy\callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\_pytest\main.py", line 259, in pytest_collection
    return session.perform_collect()
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\_pytest\main.py", line 498, in perform_collect
    session=self, config=self.config, items=items
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\pluggy\hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\pluggy\manager.py", line 92, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\pluggy\manager.py", line 86, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\.nox\pytest-parametrized-3-coverage-true-crypto-none-transport-zeromq\lib\site-packages\pluggy\callers.py", line 203, in _multicall
    gen.send(outcome)
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\tests\conftest.py", line 317, in pytest_collection_modifyitems
    from_filenames_collection_modifyitems(config, items)
  File "C:\Users\ADMINI~1\AppData\Local\Temp\kitchen\testing\tests\conftest.py", line 685, in from_filenames_collection_modifyitems
    itempath = pathlib.Path(str(item.fspath)).relative_to(CODE_DIR)
  File "c:\python37\lib\pathlib.py", line 883, in relative_to
    .format(str(self), str(formatted)))
ValueError: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\kitchen\\testing\\tests\\integration\\cli\\test_batch.py' does not start with 'C:\\Users\\Administrator\\AppData\\Local\\Temp\\kitchen\\testing'
```
2020-07-13 07:07:11 -07:00
Pedro Algarvio
6f4284c106 Move --from-filenames functionality into salt 2020-05-22 09:17:36 -07:00
Pedro Algarvio
61c935443c Adjust the test suite to have a separate pytest style tests directory 2020-05-21 23:59:36 -07:00
Pedro Algarvio
d889ff7fbc Add support for the --run-slow flag into pytest 2020-05-09 17:31:55 -07:00
Pedro Algarvio
bf6b61a0e5 Fix integration.reactor.test_reactor under PyTest 2020-05-07 16:00:11 -07:00
Pedro Algarvio
ef9237e056 Upgrade to pytest-salt-factories 0.10.x 2020-05-07 16:00:11 -07:00
Pedro Algarvio
433e75fea7 Fix multimaster tests, again. 2020-05-07 16:00:11 -07:00
Pedro Algarvio
3f77f6eb28 Add pytest helper to create temporary pillar files 2020-05-07 16:00:11 -07:00
Pedro Algarvio
14e606b39c Completely remove reactors from the configuration 2020-05-07 16:00:11 -07:00
Pedro Algarvio
5e5414e9dc Remove no longer used reactor entry 2020-05-07 16:00:11 -07:00
Pedro Algarvio
6405948882 Upgrade to pytest-salt-factories 0.9.x 2020-05-07 16:00:11 -07:00
Pedro Algarvio
d30e09f297 Upgrade to pytest-salt-factories 0.8.x 2020-05-07 16:00:11 -07:00
Pedro Algarvio
c5feb6859a Create the temp directory if it doesn't exist 2020-05-07 16:00:11 -07:00
Pedro Algarvio
27a5e95541 pytest-saltfactories added support for system information reporting 2020-05-07 16:00:11 -07:00
Pedro Algarvio
ad95cd4c47 Update to saltfactories v0.7.14 2020-05-07 16:00:11 -07:00
Pedro Algarvio
982c506cc0 Fix tests/unit/test_config.py tests 2020-05-07 16:00:11 -07:00
Pedro Algarvio
eea435b91e Fix the hosts tests 2020-05-07 16:00:11 -07:00
Pedro Algarvio
e157459016 Switch to pytest-salt-factories 2020-05-07 16:00:11 -07:00
Pedro Algarvio
a115ccfcb7 Reuse code instead of duplicating it 2020-04-27 07:35:28 -07:00
Pedro Algarvio
0c225de432 Implement the requires_salt_states marker 2020-04-27 07:35:28 -07:00
Pedro Algarvio
6170458fc6 Handle race condition when reaping astray processes 2020-04-27 07:35:28 -07:00
Pedro Algarvio
2ccf2d9d80 Reset PyTest's catch_log_handler after test since pyTest doesn't do it. 2020-04-27 07:35:28 -07:00
Pedro Algarvio
63c1d2edf0 Temporarily skip tests which were simply ignored before pytest 2020-04-27 07:35:28 -07:00
Pedro Algarvio
2d4d1ff6d4 Only hack non function scoped fixtures 2020-04-27 07:35:28 -07:00
Pedro Algarvio
a51872b300 For unitest.TestClass subclasses we need to use pytest_runtest_protocol instead 2020-04-27 07:35:28 -07:00
Pedro Algarvio
22cdd04f07 Hack PyTest's fixture finalization timing 2020-04-27 07:35:28 -07:00