Commit Graph

4955 Commits

Author SHA1 Message Date
Alexandru Bleotu
07979897b6 Added tests for InvalidArgument fault handling in utils.vmware.wait_for_task 2016-11-29 05:23:07 -05:00
Mike Place
9cab761320 Merge pull request #37909 from thusoy/invalid-timezone
Throw error when setting invalid timezone
2016-11-28 14:04:35 -07:00
Tarjei Husøy
316d581354 Throw error when setting invalid timezone
Closes #37685.
2016-11-28 09:21:52 -08:00
m03
2aeaf553c8 Add tests 2016-11-28 07:33:01 -08:00
Alexandru Bleotu
39fe0b41b6 Added/updated tests for exception handling/get_root_folder change in utils.vmware.get_content 2016-11-24 05:53:51 -05:00
Alexandru Bleotu
ed64348502 Added tests for exception handling in utils.vmware.is_connection_to_a_vcenter 2016-11-22 09:08:06 -05:00
Alexandru Bleotu
3497d2344e Added tests for exception handling in utils.vmware.get_service_instance 2016-11-22 09:08:06 -05:00
castor-morveer
6246a98cfa Boto apigateway optional stacktrace in response mapping (#37618)
* adding optional response template parameters for normal and error cases

* making optional response templates affect checksum calculation in order to correctly determine if the service needs updating

* Remove trailing whitespace

* removing trailing whitespaces

* correcting invalid mock values in unit test code
2016-11-21 14:47:52 -07:00
Alexandru Bleotu
102b2b2e98 Vmware disconnect gh (#37809)
* Added utils.vmware.disconnect

- disconnects from a vCenter or ESXi host

* Added tests for salt.utils.vmware.disconnect
2016-11-21 13:25:16 -07:00
Moe
40af1857be Add more aptpkg unit tests (#37793)
* Add more aptpkg unit tests

* Add test_refresh_db
2016-11-21 09:19:42 -07:00
rallytime
6479a22c1d Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/modules/napalm_network.py
2016-11-18 07:50:16 -07:00
rallytime
d5a7ef6ca8 Merge branch '2016.3' into '2016.11'
No conflicts.
2016-11-17 10:37:42 -07:00
Mike Place
3be9ab4cd0 Warn on AES test for systems with > 1 core (#37724)
* Warn on AES test for systems with > 1 core

* Whitespace fix
2016-11-16 09:44:33 -07:00
Mike Place
c8fb487590 Added space for lint check in in-line comment 2016-11-15 13:56:47 +13:00
Eric Radman
a42ca638ec joyent: Properly handle error if deployment fails
Previous behavior if an invalid profile parameter was used:

TypeError: 'NoneType' object has no attribute '__getitem__'

New Behavior:

Error: There was a profile error: Failed to deploy VM

Also fix up some pylint complaints
2016-11-14 18:44:07 -05:00
kevin
1865b13645 Fix 'present' option when used without 'key_type' 2016-11-14 12:16:51 -07:00
rallytime
1b5f89577e Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/cloud/clouds/vmware.py
2016-11-14 09:19:49 -07:00
m03
8cb794addb Add initial aptpkg unit tests 2016-11-13 09:10:37 -08:00
rallytime
b86e9270e7 Update "warn" to "warning" in verify_test 2016-11-11 09:05:44 -07:00
Mike Place
737436a463 Merge pull request #37146 from cachedout/master_pub_error_reporting
Master publish error reporting
2016-11-11 22:52:31 +13:00
Mike Place
2c2dc93640
Fix test and check for jid not in pub_data 2016-11-11 15:37:47 +13:00
rallytime
4c245a3fa5 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/x509.py
2016-11-10 16:51:52 -07:00
rallytime
7b2341bbfd Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/topics/releases/releasecandidate.rst
  - salt/modules/file.py
  - salt/states/file.py
  - salt/utils/network.py
2016-11-10 15:59:51 -07:00
Mike Place
403b469aea Merge pull request #37601 from eradman/random_org
Skip random.org tests for any communication failure
2016-11-11 10:52:25 +13:00
Eric Radman
671cebfa30 Skip random.org tests for any communication failure
This test connects to random.org, which may throws the following error
on one network I manage:

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

Other errors are possible, such as `socket.error`.  Since it is
difficult to anticipate the failure mode, skip these tests if https
communication provokes any exception.

Also, this is not a unit test--it's more of a system test. My
recommendation that we recategorize this as an integration test where
global IPv4 routing can more reasonably expected.
2016-11-10 07:48:24 -05:00
Eric Radman
b19440418d Fixes to unit tests (#37586)
Add skipIf pyvmomi is not installed

    NameError: global name 'vmodl' is not defined
    NameError: global name 'vim' is not defined

Fix skipIf typo for OpenBSD

    >>> import sys
    >>> sys.platform
    'openbsd6'

Avoid warning from glusterfs.py:

    Use specific 'len(elem)' or 'elem is not None' test

Enable boto_secgroup_test tests that work now:

    test skipped due to error in moto return - fixed in
    cc01669643
2016-11-09 13:58:08 -07:00
rallytime
f44e14b63c Merge branch 'carbon' into '2016.11'
Conflicts:
  - salt/modules/file.py
2016-11-09 12:56:58 -07:00
Erik Johnson
2fc0b222bc Fix regression in service.dead state (#37562)
* Fix regression in service.dead state when service is not available

This was originally broken in c4f899b.

* Add unit test for issue 37511
2016-11-08 14:58:33 -07:00
Nicole Thomas
2e8e56ca69 [PY3] Change log.warn statements to log.warning (#37531)
* [PY3] Change log.warn statements to log.warning

log.warn is deprecated in Python 3. This change removes the
occurance of deprecation warnings for using log.warn. For example:

```
17:24:23 [WARNING ] /testing/salt/utils/verify.py:522: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
17:24:23   log.warn('Insecure logging configuration detected! Sensitive data may be logged.')
17:24:23
17:24:23 [WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
```

* Tweak unit.utils.verify_test to using warning instead of warn
2016-11-08 13:06:54 -07:00
rallytime
5ead1425d7 Merge branch '2016.3' into 'carbon'
Conflicts:
  - doc/topics/releases/releasecandidate.rst
  - salt/modules/win_servermanager.py
2016-11-08 13:04:33 -07:00
Nicole Thomas
453319b50a Don't pass the vpc id to boto.vpc.create_internet_gateway func (#37556)
That function's namespace looks like this:
```
def create_internet_gateway(self, dry_run=False):
```
So when we pass in the vpc_id opbject in the test, the check later
in the function sets `dry_run=True` since the vpc_id opbject exists.

This later throws JSONResponseErrors because the `DryRun` flag is
set. This error raising functionality was added in the most recent
version of moto, which exposed this bug.

This fixes the three boto_vpc_test unit state tests. We'll see if
other tests need to be addressed in other files on a full test run.
2016-11-08 12:48:26 -07:00
Mike Place
610a198322
Lint 2016-11-08 19:40:48 +13:00
Mike Place
3e848ad126
Cache tests 2016-11-08 18:49:10 +13:00
Mike Place
efef3948ad
Add unit tests for minion targeting 2016-11-08 16:27:36 +13:00
rallytime
2e68da3e52 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/topics/cloud/vmware.rst
  - salt/cloud/clouds/vmware.py
2016-11-07 08:22:17 -07:00
rallytime
eae3b9e30f Merge branch 'carbon' into '2016.11'
No conflicts.
2016-11-07 08:15:42 -07:00
rallytime
3b56f8bce1 Merge branch '2016.3' into 'carbon'
Conflicts:
  - doc/topics/event/master_events.rst
2016-11-07 08:13:57 -07:00
Mike Place
33d0789f6e Merge pull request #37348 from alexbleotu/create_cluster-gh
Create cluster gh
2016-11-06 15:02:41 +13:00
Mike Place
be93710fee Merge pull request #37452 from rallytime/fix-31135
file.line with mode=replace on an empty file should return False, not stacktrace
2016-11-06 14:55:11 +13:00
Mike Place
b678e7353d Merge pull request #37465 from lorengordon/jinja-filters
Adds a couple handy jinja filters, `escape_regex` and `unique`
2016-11-06 14:54:20 +13:00
Mike Place
9ce38fd4d6 Merge pull request #37466 from alexbleotu/test_rename-gh
Renamed salt.utils.vmware.update_cluster tests
2016-11-06 14:52:55 +13:00
Mike Place
9e4e936f4f Merge pull request #37473 from m03/fix-167-logrotate-state_2
Fix #167 - Add logrotate state module
2016-11-06 14:45:15 +13:00
rallytime
9b3e4414c8 Merge branch '2016.3' into 'carbon'
Conflicts:
  - pkg/windows/modules/get-settings.psm1
  - salt/modules/mac_power.py
  - salt/modules/win_dsc.py
  - salt/modules/win_servermanager.py
  - salt/states/file.py
  - salt/utils/event.py
  - salt/utils/gitfs.py
2016-11-04 15:23:49 -06:00
rallytime
ce4b82fdee Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/modules/archive.py
  - salt/modules/status.py
  - salt/states/file.py
  - tests/unit/modules/status_test.py
2016-11-04 13:51:46 -06:00
rallytime
4132929832 Merge branch 'carbon' into '2016.11'
No conflicts.
2016-11-04 13:38:34 -06:00
m03
466efd3f55 Change test str to int for consistency 2016-11-04 09:43:02 -07:00
Erik Johnson
a3f38e5a9f Update file.extract_hash unit tests
These tests now not only test the new functionality added for matching
on source URI and source_hash_name, but also test non-specific hash_type
lookups, specific hash_type lookups, and failed specific hash_type
lookups (i.e. requesting a hash type not present in the file).
2016-11-04 11:25:54 -05:00
Pablo Suárez Hernández
4ae036055d Fix unit test for Zypper dist-upgrade in Carbon 2016-11-04 09:36:41 -06:00
Loren Gordon
20eb0bf347 Adds a set theory jinja filter unique 2016-11-04 10:14:24 -04:00
Alexandru Bleotu
b3404ae7a2 Renamed salt.utils.vmware.update_cluster tests 2016-11-04 09:57:23 -04:00