Mike Place
2e1f7c37f7
Merge pull request #46569 from rallytime/merge-2018.3
...
[2018.3] Merge forward from 2017.7 to 2018.3
2018-03-21 20:57:04 +00:00
rallytime
b03cda3cea
Merge branch '2018.3.0rc1' into '2018.3'
...
No conflicts.
2018-03-20 09:13:13 -04:00
rallytime
8d1e1e7f94
Merge branch '2017.7' into '2018.3'
...
Conflicts:
- .kitchen.yml
- Gemfile
- pkg/windows/build_env_2.ps1
- pkg/windows/build_env_3.ps1
- pkg/windows/req.txt
- salt/client/ssh/__init__.py
- salt/client/ssh/ssh_py_shim.py
- salt/modules/boto_vpc.py
- salt/modules/file.py
- salt/modules/heat.py
- salt/modules/smartos_vmadm.py
- salt/modules/win_dsc.py
- salt/returners/elasticsearch_return.py
- salt/runners/salt.py
- salt/states/module.py
- salt/utils/win_functions.py
- setup.py
- tests/integration/modules/test_state.py
- tests/unit/grains/test_core.py
- tests/unit/test_pillar.py
2018-03-15 17:22:05 -04:00
twangboy
50a860b839
Remove unicode things
2018-03-15 12:55:26 -06:00
twangboy
8474006dab
Fix 2 tests
...
Modifies the fibre_channel.py grain for linux to allow mocking. You
can't mock a file handle used in a for loop.
Fixes the mocking in test_windows_iscsi_iqn_grains. Apparently, you
can't stack multiple mocks in the same with statement.
2018-03-15 11:15:57 -06:00
twangboy
5636ab7cd4
Fix some lint
2018-03-14 16:39:40 -06:00
twangboy
16949c0b93
Fix failing tests, add new tests
2018-03-14 16:37:42 -06:00
Justin Findlay
d5561bedaf
tests.unit.grains.core add scoped IPv6 nameserver
2018-03-05 12:31:04 -08:00
rallytime
aad61c77bd
Update old utils paths to new paths
2018-02-27 17:20:45 -05:00
rallytime
7243baf2c0
Merge branch '2017.7' into '2018.3'
...
Conflicts:
- doc/topics/orchestrate/orchestrate_runner.rst
- salt/grains/core.py
- salt/modules/git.py
- salt/pillar/ec2_pillar.py
- salt/runner.py
- salt/utils/ssh.py
- tests/integration/modules/test_cp.py
- tests/unit/grains/test_core.py
- tests/unit/modules/test_file.py
- tests/unit/modules/test_git.py
2018-02-27 17:13:28 -05:00
Benjamin Drung
0b445f2a37
tests: Add unit tests for _parse_os_release()
...
Add tests cases to fully cover _parse_os_release().
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:38:23 +01:00
Benjamin Drung
f6069b77ed
Fix osfinger grain on Debian
...
Rework _run_os_grains_tests() to check all os grains including osfinger.
Fix osfinger on Debian (e.g. use "Debian-9" instead of
"Debian GNU/Linux-9").
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
8dde55a761
tests: Add os_grains test cases for Debian
...
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
ff02ab9937
tests: Add Ubuntu 17.10 (artful) os_grains test case
...
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
77d5356aba
Fix incorrect oscodename grain on Ubuntu
...
Use the full content of /etc/os-release for the Ubuntu 16.04 (artful)
os_grains test case. This reveals a bug that 'oscodename' is not
correctly calculated if /etc/os-release provides PRETTY_NAME:
FAIL: test_ubuntu_os_grains (tests.unit.grains.test_core.CoreGrainsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/unit/grains/test_core.py", line 439, in test_ubuntu_os_grains
self._run_ubuntu_os_grains_tests(_os_release_map)
File "tests/unit/grains/test_core.py", line 446, in _run_ubuntu_os_grains_tests
self._run_os_grains_tests(os_release_map)
File "tests/unit/grains/test_core.py", line 262, in _run_os_grains_tests
self.assertEqual(os_grains.get('oscodename'), os_release_map['oscodename'])
AssertionError: 'Ubuntu 16.04.3 LTS' != 'xenial'
- Ubuntu 16.04.3 LTS
+ xenial
fixes #34423 for Ubuntu
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
7e62dc9fd2
tests: Support reading os-release files from disk
...
Instead of storing pre-parsed os-release files, add support for reading
os-release files from disk.
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
a92ec0db1b
Make _parse_os_release() always callable
...
To simplify running unit tests against os_data(), make the
_parse_os_release() function always callable to avoid needing to mock
os.path.isfile().
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
eee1fe5b38
tests: Dissolve _run_ubuntu_os_grains_tests
...
_run_ubuntu_os_grains_tests is only used once and does not provide any
useful abstraction since the introduction of _run_os_grains_tests.
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
1d6ef731fe
tests: Deduplicate _run_os_grains_tests()
...
_run_suse_os_grains_tests() and _run_ubuntu_os_grains_tests() share most
of their logic. Combine the common part in _run_os_grains_tests() and
let the remaining small parts live in their origin functions.
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Bo Maryniuk
1b75f98a91
Catch proper exception type
2018-02-21 13:11:44 +01:00
Bo Maryniuk
5149cdbbd9
Fix unit test for py3
2018-02-21 10:53:20 +01:00
Bo Maryniuk
b24a8c3653
Use salt.utils.platform for OS detection
2018-02-20 18:36:27 +01:00
Bo Maryniuk
98cb94ae73
Update unit test on ignoring logging while file do not exist
2018-02-20 16:47:05 +01:00
Bo Maryniuk
2e76606edf
Update unit test for catching out permission error
2018-02-20 16:46:43 +01:00
Bo Maryniuk
e61315c956
Update unit test to handle OSError exception
2018-02-20 16:28:00 +01:00
Bo Maryniuk
8aa0e83be6
Refactor unit test for simplicity so it does not need to be splitted in two functions
2018-02-20 15:25:54 +01:00
Bo Maryniuk
8320939f5e
Add pytest
2018-02-20 15:25:19 +01:00
Bo Maryniuk
3015ed6bcb
Fix unit test for testing main functionality of linux_iqn
2018-02-20 15:18:21 +01:00
Bo Maryniuk
2aa4d02677
Add unit test for linux_iqn testing, if not iscsii available
2018-02-20 15:10:11 +01:00
Bo Maryniuk
a2ba9377f6
Add unit test for grains linux_iqn when running as non-root
2018-02-20 15:03:59 +01:00
rallytime
3c298afa72
Merge branch '2017.7' into 'oxygen'
...
Conflicts:
- salt/modules/pip.py
- salt/modules/reg.py
- salt/modules/win_pkg.py
- salt/runners/manage.py
- salt/states/pkg.py
- salt/transport/zeromq.py
- salt/utils/event.py
- tests/integration/modules/test_pip.py
- tests/integration/states/test_user.py
- tests/unit/grains/test_core.py
- tests/unit/states/test_archive.py
- tests/unit/utils/test_boto.py
2018-01-23 13:26:43 -05:00
rallytime
e0ffa32b49
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- tests/integration/modules/test_pkg.py
2018-01-19 10:09:36 -05:00
Daniel Wallace
6c26025664
fix mock for opensuse
...
Opensuse needs a run_all in here, mock it so we don't see an error, and still
test the docker stuff
2018-01-18 10:48:07 -07:00
rallytime
60370f5fb6
Merge branch '2017.7' into 'oxygen'
...
Conflicts:
- salt/config/__init__.py
- salt/daemons/masterapi.py
- salt/proxy/dummy.py
- salt/states/file.py
- tests/integration/modules/test_state.py
- tests/integration/runners/test_runner_returns.py
- tests/integration/ssh/test_state.py
- tests/support/parser/__init__.py
- tests/unit/grains/test_core.py
- tests/unit/states/test_file.py
2018-01-11 16:00:08 -05:00
Erik Johnson
5473c085d9
Fix loader error in 2017.7 tests
2018-01-11 08:40:27 -06:00
Erik Johnson
f900715e1c
[PY3] add unicode_literals to log/grains modules
2018-01-10 11:37:59 -06:00
twangboy
48f12a3bbc
Skip linux specific tests
2018-01-08 15:38:26 -07:00
Ch3LL
0919d8787b
Skip iscsi grains test if MacOSX
2018-01-08 10:54:45 -05:00
Erik Johnson
d9a915fdc9
Update mocking in unit.grains.test_core.CoreGrainsTestCase.test_docker_virtual
...
This fixes this test in Oxygen, where the function name has changed.
2017-12-23 19:47:37 -06:00
rallytime
9ded5e1cbb
Merge branch '2017.7' into 'oxygen'
...
Conflicts:
- salt/config/__init__.py
- salt/grains/core.py
- salt/modules/win_lgpo.py
- salt/returners/mysql.py
- salt/states/libcloud_dns.py
- tests/integration/runners/test_runner_returns.py
- tests/unit/grains/test_core.py
2017-12-21 15:58:08 -05:00
Erik Johnson
2d0e96385f
Fix import of ipaddress on PY3
...
This should only be imported on PY2
2017-12-19 12:09:36 -06:00
rallytime
a0d2dd2069
Lint fix
2017-12-13 14:06:11 -05:00
rallytime
9db4179462
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- tests/unit/grains/test_core.py
2017-12-12 15:24:30 -05:00
rallytime
db5866d097
Update old utils paths to new utils paths
2017-12-11 18:43:33 -05:00
rallytime
08c71f13e4
Merge branch '2017.7' into 'oxygen'
...
Conflicts:
- doc/ref/configuration/minion.rst
- doc/topics/thorium/index.rst
- salt/beacons/__init__.py
- salt/client/mixins.py
- salt/client/ssh/wrapper/state.py
- salt/daemons/masterapi.py
- salt/grains/extra.py
- salt/minion.py
- salt/modules/cron.py
- salt/modules/file.py
- salt/modules/mac_user.py
- salt/modules/napalm_network.py
- salt/modules/state.py
- salt/modules/win_file.py
- salt/modules/win_pkg.py
- salt/proxy/dummy.py
- salt/state.py
- salt/states/file.py
- salt/states/lxc.py
- salt/utils/__init__.py
- salt/utils/schedule.py
- tests/integration/modules/test_file.py
- tests/integration/modules/test_groupadd.py
- tests/integration/ssh/test_state.py
- tests/integration/states/test_file.py
- tests/unit/daemons/test_masterapi.py
- tests/unit/grains/test_core.py
- tests/unit/modules/test_disk.py
- tests/unit/modules/test_napalm_network.py
- tests/unit/modules/test_state.py
- tests/unit/test_minion.py
- tests/unit/utils/test_process.py
2017-12-11 18:24:41 -05:00
Daniel Wallace
3f1268d67f
fix patching for python 2.6
2017-12-07 08:25:26 -07:00
Anthony Shaw
6231d69f85
Merge remote-tracking branch 'origin/develop' into more_napalm_tests
2017-12-06 15:12:35 +11:00
Daniel Wallace
1d0bd5bb32
Merge branch '2016.11' into 2016.11
2017-12-04 10:13:15 -07:00
rallytime
3d9eafc4bd
Lint: Remove extra empty lines at end of files
2017-12-01 14:46:27 -05:00
rallytime
239f3511bf
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- salt/modules/reg.py
- salt/modules/state.py
- salt/modules/win_pkg.py
- salt/netapi/rest_cherrypy/app.py
- salt/utils/__init__.py
- tests/integration/modules/test_file.py
- tests/integration/output/test_output.py
- tests/unit/grains/test_core.py
2017-12-01 11:12:44 -05:00