Commit Graph

15255 Commits

Author SHA1 Message Date
Cédric Bosdonnat
0d32cb9228 libvirt events: fix domain defined/updated event details
Libvirt events algorigthm converting the libvirt enums into string has a
flaw that unit tests couldn't see. Libvirt python binding defines the
following constants:

VIR_DOMAIN_EVENT_CRASHED_PANICKED = 0
VIR_DOMAIN_EVENT_DEFINED = 0
VIR_DOMAIN_EVENT_CRASHED = 8

However VIR_DOMAIN_EVENT_CRASHED_PANICKED is the only value in this enum
and thus wasn't not considered a sub-enum element. So the value 0 in
enum 'VIR_DOMAIN_EVENT_' was wrongly mapped to "crashed panicked"
instead of "defined".

In order to safely rule this case out, check if we have an item that
just ends with the subprefix without the '_'.
2018-12-18 16:00:15 +01:00
Daniel Wozniak
ea99008c88
Merge pull request #50875 from twangboy/fix_test_user
Fix `unit.modules.test_win_goupadd` on Windows
2018-12-14 16:47:11 -07:00
twangboy
8997550040
Fix unit tests 2018-12-14 14:12:49 -07:00
Ch3LL
10cb130eb6
Add tempfile import in file tests 2018-12-14 13:18:11 -05:00
Ch3LL
449fa2e7ee
Merge branch '2018.3' into 'fluorine'
Conflicts:
  - salt/templates/debian_ip/debian_eth.jinja
2018-12-14 11:39:49 -05:00
twangboy
8e3c2c8204
Fix failing tests
Fixes failing tests in:
- integration.modules.test_groupadd
- integration.modules.test_useradd
2018-12-12 16:12:06 -07:00
Daniel Wozniak
6ea059d308
Merge pull request #50843 from bdrung/fix-tests
Fix RemoveCapacityFromDiskgroupTestCase require pyvmomi
2018-12-12 13:36:31 -07:00
Benjamin Drung
0d00ae4f8e Fix RemoveCapacityFromDiskgroupTestCase require pyvmomi
If the `pyvmomi` library is missing, all tests from the
tests.unit.modules.RemoveCapacityFromDiskgroupTestCase will fail:

```
ERROR: test__get_proxy_target_call
(unit.modules.test_vsphere.RemoveCapacityFromDiskgroupTestCase)
[CPU:0.0%|MEM:35.1%]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "salt/utils/vmware.py", line 485, in disconnect
    Disconnect(service_instance)
NameError: name 'Disconnect' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "salt/modules/vsphere.py", line 381, in _gets_service_instance_via_proxy
    salt.utils.vmware.disconnect(local_service_instance)
  File "salt/utils/vmware.py", line 486, in disconnect
    except vim.fault.NoPermission as exc:
NameError: name 'vim' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "salt/utils/vmware.py", line 485, in disconnect
    Disconnect(service_instance)
NameError: name 'Disconnect' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tests/unit/modules/test_vsphere.py", line 1568, in test__get_proxy_target_call
    capacity_disk_ids=['fake_disk1', 'fake_disk2'])
  File "salt/modules/vsphere.py", line 295, in __supports_proxies
    return fn(*args, **salt.utils.args.clean_kwargs(**kwargs))
  File "salt/modules/vsphere.py", line 386, in _gets_service_instance_via_proxy
    salt.utils.vmware.disconnect(local_service_instance)
  File "/home/bdrung/projects/salt/debian/salt/utils/vmware.py", line 486, in disconnect
    except vim.fault.NoPermission as exc:
NameError: name 'vim' is not defined
```

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-12 20:21:49 +01:00
Erik Johnson
1a00abc5f6
Add unit test for _get_proc_cmdline 2018-12-12 11:41:18 -06:00
Erik Johnson
9eaa2edfe3
Remove extraneous comments 2018-12-12 11:11:12 -06:00
Mike Place
dba53ee93c
Merge pull request #50831 from DSRCorporation/bugs/50809_gpg_renderer_fix_fluorine_backbort
Don't try to decrypt values without PGP header line (fluorine backport)
2018-12-12 09:13:54 -07:00
Erik Johnson
0710ad0a40
Skip flaky vultr test 2018-12-12 08:51:49 -06:00
Dmitry Kuzmenko
07ac1ca244
Don't try to decrypt values without PGP header line 2018-12-12 12:25:35 +03:00
Jenkins
f077783cbd
Add some tests 2018-12-10 13:43:54 -07:00
Mike Place
241741a6d0
Merge pull request #50086 from twangboy/fix_win_groupadd
Make win_groupadd module behave like other modules
2018-12-10 13:30:11 -07:00
Mike Place
9f8289be9c
Merge pull request #50692 from terminalmage/update-tests
Update a couple test modules to use with_tempdir/with_tempfile decorators
2018-12-10 10:24:02 -07:00
Mike Place
3a71567f43
Merge pull request #50768 from sathieu/git_pillar_all_saltenvs
git_pillar: Add support for all_saltenvs parameter
2018-12-10 09:39:36 -07:00
Mike Place
b963b55e9a
Merge pull request #50787 from cbosdo/xen-fixes
Xen fixes
2018-12-10 09:35:19 -07:00
Mike Place
12a8447741
Merge pull request #50796 from dwoz/issue48801
Fix #48801 min, max, inact, and warn changes
2018-12-10 09:30:13 -07:00
Michael Lustfield
d34eadec0c
Use a temp file instead of /etc/network/interfaces for unit tests. 2018-12-10 10:45:42 -05:00
Michael Lustfield
1b096fbee6
Removed python lint. 2018-12-10 10:45:01 -05:00
Michael Lustfield
638f899e6d
Added support for loopback devices to modules.debian_ip(). (Fixes: #38672) 2018-12-10 10:44:15 -05:00
Michael Lustfield
cf61c8d9cf
Added a bunch of unit tests for modules.debian_ip.build_interface(). 2018-12-10 10:44:06 -05:00
Daniel A. Wozniak
6b9522343e
fix linter errors 2018-12-07 18:41:42 -07:00
Daniel A. Wozniak
87a04df512
Fix #48801 min, max, inact, and warn changes
The _changes method was not properlt reporting mindays, maxdays,
inactdays and warndays values
2018-12-07 17:22:11 -07:00
Erik Johnson
1fde50d84a
Mark integration.modules.test_cp.CPModuleTest.test_get_file_str_https as flaky
There appears to be something weird with the DNS resolution on the AWS
Arch boxes. This test fails because it fails to resolve
repo.saltstack.com, and I can reproduce this using an AWS instance via
TestKitchen, but if I run the test again it works.

By marking this test as flaky we can make it reattempt (when necessary)
and get it to pass.
2018-12-07 09:25:08 -06:00
Cédric Bosdonnat
29c8f1a7c1
Virt: fix XEN ParaVirtualized guests support
XEN ParaVirtualized (aka. PV guests) guests need special treatment.
Add the xen hypervisor where needed, and set the kernel to boot.
2018-12-07 11:41:27 +01:00
Cédric Bosdonnat
cc2ba6aeca
virt capabilities may have no features element
Xen servers often have at least one guest with no features element at
all in the XML capabilities. Handle this case and test for it.
2018-12-07 10:49:16 +01:00
Gareth J. Greenaway
7f6af2ce28
Merge branch 'fluorine' into merge-fluorine 2018-12-06 18:08:44 +01:00
Ch3LL
99672ef5c6
Merge branch '2018.3' into 'fluorine'
No conflicts.
2018-12-06 11:29:34 -05:00
Daniel Wozniak
0ffd1e5bac
Merge pull request #50771 from terminalmage/salt-jenkins-1222
Fix failing opensuse tests
2018-12-06 09:08:58 -07:00
Daniel Wozniak
65e7d3bc8d
Merge pull request #50746 from dwoz/macostestprog
Fix exit status tests on osx
2018-12-06 08:39:56 -07:00
Erik Johnson
fa7dd07077
Add an additional assert 2018-12-06 08:39:33 -06:00
Erik Johnson
0edd58cffb
Fix failing opensuse tests 2018-12-05 22:48:33 -06:00
Mike Place
dc9414cd0e
Merge pull request #50767 from dwoz/ldap_no_pass
Make sure ldap passwords are honored
2018-12-05 15:59:16 -07:00
Gareth J. Greenaway
1b4d398579
Merge branch '2018.3' into fluorine
Conflicts:
	salt/modules/acme.py
2018-12-05 21:54:14 +01:00
Daniel A. Wozniak
67aa591d1e
Fix linter errors 2018-12-05 13:12:34 -07:00
Mathieu Parent
e9714126ac
git_pillar: Add support for all_saltenvs parameter
On the road to #32245.
2018-12-05 20:56:29 +01:00
Daniel A. Wozniak
be3945afeb
Remove crufty import 2018-12-05 12:56:16 -07:00
Daniel A. Wozniak
91f50a4ce7
Add more ldap auth tests for ZD-2993 2018-12-05 12:55:26 -07:00
Daniel A. Wozniak
055a8d5d74
Make sure ldap passwords are honored 2018-12-05 12:46:10 -07:00
Mathieu Parent
5423c27f84
git_pillar: Allow root and mountpoint parameters together
Fixes: #50364
2018-12-05 05:20:04 +01:00
Daniel A. Wozniak
6d07cb4af7
Fix exit status tests on osx 2018-12-04 10:44:50 -07:00
Daniel A. Wozniak
c53c046edf
Older MacOS versions won't have TMPDIR environment 2018-12-04 09:16:48 -07:00
Gareth J. Greenaway
fde8db5ef4
Merge branch '2017.7' into merge-2017.7
Conflicts:
	tests/support/case.py
2018-12-04 15:53:04 +01:00
Mike Place
36a4a1af49
Merge branch '2018.3' into update-tests 2018-12-03 13:04:16 -07:00
Erik Johnson
be14517c5c
Make x509 tests use tempfiles instead of hard-coding them
This keeps us from needing to manually clean them up in the tearDown
2018-12-03 13:13:14 -06:00
Daniel Wozniak
246c055676
Merge pull request #50718 from dwoz/run_run_timeout
Honor run_run timeout for shell tests
2018-12-03 09:00:23 -07:00
Daniel Wozniak
d9c5f57437
Merge pull request #50719 from dwoz/orchestrate_subset
Increase timeout on orchestrate subset test
2018-12-03 09:00:07 -07:00
Daniel A. Wozniak
6118bdffe0 Fix spacing 2018-12-02 15:40:09 -07:00