Pedro Algarvio
d397763553
Adjust to the new LoaderModuleMockMixin usage
2017-03-28 19:03:59 +01:00
Pedro Algarvio
1f7a0aa65b
Proper mocking
2017-03-28 19:00:51 +01:00
Adam Mendlik
6c6e8d17bc
Update unit test for Saltify with credential verification
2017-03-27 19:20:38 -06:00
Pedro Algarvio
0b41b92d7d
Use salt.utils.versions
instead of distutils.version
2017-03-08 19:22:33 +00:00
Pedro Algarvio
d13b40554b
Use the __version__
variable from tests.support.mock
2017-03-06 14:35:12 +00:00
Pedro Algarvio
40a64191a1
Absolute imports and A LOT of code cleanup.
2017-03-01 01:33:07 +00:00
Pedro Algarvio
3beb3fb801
Move whatever we need from salttesting to salt.
...
Let's drop the salttesting dependency cycle.
2017-02-28 22:52:49 +00:00
Pedro Algarvio
15af4c9728
Test filenames conformity. Adjust for pytest.
2017-02-23 23:19:42 +00:00
Pedro Algarvio
ce71f6d45f
Code cleanup
2017-02-23 12:55:53 +00:00
Pedro Algarvio
e48ea8fa1b
Don't use assert_called_once()
or assert_not_called()
.
...
These worked in Py2 but not in Py3.
A read of http://engineroom.trackmaven.com/blog/mocking-mistakes/ specially the section "Mocking the unexpected" will enlighten one.
2017-02-23 10:40:58 +00:00
rallytime
5db986860c
[develop] Fix some pylint errors that snuck into develop
2017-02-22 17:02:21 -07:00
Sergei Zviagintsev
313e9cae06
Add unit test for _validate_key_file_permissions in ec2 module
2017-02-22 11:38:40 +01:00
Mike Place
b341357942
Remove Joyent test
...
Removed per https://github.com/saltstack/salt/pull/37756#issuecomment-263618695
2016-11-29 09:54:46 -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
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
4080cb4f12
Merge branch '2016.3' into 'carbon'
...
No conflicts.
2016-11-03 08:54:32 -06:00
Aditya Kulkarni
e9b4620fac
Add unit tests for cloning from snapshot ( #37414 )
2016-11-02 11:22:37 -06:00
rallytime
8d3957f250
Merge branch 'carbon' into 'develop'
...
Conflicts:
- salt/cloud/clouds/vmware.py
- salt/modules/boto_ec2.py
- salt/modules/cmdmod.py
- salt/modules/win_lgpo.py
2016-10-28 11:58:41 -06:00
Eric Radman
f42480a1a9
Joyent: wait for node state to flip to 'ready' ( #37305 )
...
When provisioning a SmartOS machine on Joyent using salt-cloud, the IP
is often set before SSH is fully configured. This can result in a
successful SFTP transfer, followed by a failure to run
salt-bootstrap.sh.
2016-10-28 09:32:54 -06:00
C. R. Oldham
6a7eab9e16
Remove this test, it is no longer illegal to leave out image
...
and clonefrom parameters. It is possible to create a VM from scratch.
2016-10-25 15:23:32 -06:00
rallytime
0a5b1f5466
Merge branch 'carbon' into 'develop'
...
No conflicts.
2016-10-13 09:58:18 -06:00
rallytime
1d3aaf8097
Merge branch '2016.3' into 'carbon'
...
Conflicts:
- doc/ref/configuration/minion.rst
2016-10-12 15:26:27 -06:00
Justin Findlay
4d8fb03b79
return opennebula errors to user ( #36930 )
...
* cloud.clouds.opennebula: return errors to user
* cloud.clouds.opennebula._get_xml: add unit test
2016-10-12 10:19:11 -06:00
rallytime
8e0b1a3718
Merge branch 'carbon' into 'develop'
...
No conflicts.
2016-09-22 10:09:06 -06:00
rallytime
18c6a736cf
The "assert_called_once" mock testing function is only available in mock 2.0.0 or greater
...
We have a couple of tests using the "assert_called_once" function, however, our salt-jenkins
states pin the version of mock at 1.0.1 (This is the last version that is compatible with
Python 2.6). We either need to use something else that works for all versions of mock or gate
the test.
In the pacman tests, it is possible to use "assert_called_with" instead of "assert_called_once"
In the dimension_data and gce unit tests, we need to gate the assertion behind a mock version check.
This way the tests won't fail if the version of mock installed is less than 2.0.0.
2016-09-21 14:46:50 -06:00
rallytime
2edfef33ae
Merge branch 'carbon' into 'develop'
...
Conflicts:
- salt/scripts.py
- salt/thorium/key.py
- tests/unit/cloud/clouds/dimensiondata_test.py
- tests/unit/cloud/clouds/gce_test.py
2016-09-08 17:31:29 -06:00
rallytime
c30f697dfd
Pylint fix
2016-09-08 17:23:15 -06:00
rallytime
6da0fbbe96
Merge branch '2016.3' into 'carbon'
...
Conflicts:
- salt/modules/cmdmod.py
- salt/modules/linux_sysctl.py
- tests/unit/cloud/clouds/dimensiondata_test.py
- tests/unit/cloud/clouds/gce_test.py
- tests/unit/modules/boto_iot_test.py
- tests/unit/modules/mount_test.py
- tests/unit/states/boto_iot_test.py
- tests/unit/utils/network.py
2016-09-08 16:14:04 -06:00
Pablo Suárez Hernández
235d6308a4
Fixing unit tests for develop ( #36141 )
...
* Fixing skipped boto tests to prevent errors if boto3 does not exists.
* Fix tests to prevent errors when libcloud is not present
* Fix PortageConfigTestCase in case of portage is not present
2016-09-08 11:15:41 -06:00
Mike Place
1f909038f0
Merge pull request #36139 from meaksh/tests-fixes-for-2016.3
...
Fixing unit tests for 2016.3
2016-09-08 22:20:21 +09:00
Pablo Suárez Hernández
1c260e4bd0
Fix tests to prevent errors when libcloud is not present
2016-09-08 12:39:28 +01:00
rallytime
de4f77cb68
Fixup failing test: need to mock __utils__ instead of salt.utils.cloud call
2016-09-07 08:46:47 -06:00
rallytime
7b3fc41868
Merge branch '2016.3' into 'develop'
...
Conflicts:
- salt/cloud/clouds/lxc.py
- salt/cloud/clouds/nova.py
- salt/cloud/clouds/vmware.py
- salt/cloud/clouds/vsphere.py
- salt/cloud/libcloudfuncs.py
- salt/minion.py
- salt/modules/yumpkg.py
- salt/utils/cloud.py
2016-08-18 14:37:42 -06:00
rallytime
e61b04a707
Merge branch '2015.8' into '2016.3'
...
Conflicts:
- salt/cloud/clouds/digital_ocean.py
- salt/cloud/clouds/ec2.py
- salt/cloud/clouds/libcloud_aws.py
- salt/cloud/clouds/opennebula.py
- salt/cloud/clouds/rackspace.py
- salt/cloud/clouds/softlayer.py
- salt/cloud/clouds/softlayer_hw.py
- salt/cloud/clouds/vmware.py
- salt/loader.py
- salt/modules/aptpkg.py
- salt/modules/ebuild.py
- salt/modules/pacman.py
- salt/modules/systemd.py
- salt/modules/yumpkg.py
- salt/modules/zypper.py
- salt/scripts.py
- salt/utils/cloud.py
2016-08-18 12:09:51 -06:00
Daniel Wallace
2d8ec1e9db
use __opts__ in salt.utils.cloud for cache functions
2016-08-16 12:03:45 -05:00
anthony-shaw
e427815caf
fix clrf
2016-08-15 16:30:58 -06:00
anthony-shaw
06530b5461
add a test to check existing functionality is broken
2016-08-15 15:53:05 -06:00
Mike Place
afe50c7fc8
Fixup VMWare PR
...
Refs #35099
2016-08-07 07:50:28 +09:00
Oliver Tupman
af0e0ac165
Resolves issue where no image or clonefrom gives image
log error, along with a test for it
2016-08-03 12:16:26 +01:00
Oliver Tupman
5b9e618103
Fixes minor whitespace and comment issues
2016-08-02 09:35:19 +01:00
Oliver Tupman
922163be2a
Adds tests for changes, plus a small refactor to remove a comment
2016-08-01 17:06:57 +01:00
Oliver Tupman
3b79c7c36d
Quick refactor to remove duplication and add a test for config validation failure
2016-08-01 17:06:57 +01:00
Oliver Tupman
e37a8e98bd
Adds simple, if verbose test to validate the image/clonefrom settings
2016-08-01 17:06:57 +01:00
Anthony Shaw
6c08afd62b
GCE Cloud tests ( #34871 )
...
* add test module
* modify GCE tests to remove mocks
* use certifi, libcloud has also patched the SuSE/Mac cert issues
* skip cert checking
* validate the __virtual__ and import process
* fix munged merge
* fixed lint errors and failing test
* fix dimensiondata tests in the same way whilst I'm here
2016-07-26 09:24:20 -06:00
rallytime
56fb834718
Remove tests that don't test anything
2016-07-22 16:12:16 -06:00
rallytime
1a9d6eee15
Merge branch '2016.3' into 'develop'
...
Conflicts:
- salt/grains/core.py
- salt/state.py
- tests/unit/grains/core_test.py
2016-07-21 12:06:25 -06:00
rallytime
15b4f5a8b3
Skip GCE unit tests - causes test suite to hang
2016-07-21 10:53:00 -06:00
anthony-shaw
8885a8250e
fix clrf
2016-05-26 08:32:28 +10:00
anthony-shaw
805c12b392
add a test to check existing functionality is broken
2016-05-26 08:31:17 +10:00
Justin Findlay
186352a8b8
fix dimensiondata, gce unit test certs on MacOS ( #33020 )
2016-05-04 09:09:02 -07:00
Justin Anderson
fa7e32afcc
Fixing failures in gce_test and dimensiondata_test ( #32921 )
...
* Fixing failures in gce_test and dimensiondata_test
* Fixed lint
2016-04-28 14:15:22 -06:00
Anthony Shaw
1183106e75
Fix line endings
2016-04-20 01:32:49 +10:00
Anthony Shaw
d2abe56a20
Added some unit tests for GCE and Dimension Data modules
2016-04-19 08:18:25 +10:00
rallytime
62d688d720
Fix mock patch module name
2015-11-05 10:45:30 -07:00
rallytime
3bcd068f6a
Update cloud vmware unittests to utilize the salt.utils.vmware.py file
2015-11-05 10:02:05 -07:00
Colton Myers
278e8dda5b
Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
...
Conflicts:
salt/cloud/clouds/gce.py
2015-09-01 15:15:13 -06:00
rallytime
a3ac8e7008
Whitespace fix
2015-08-27 11:41:14 -06:00
rallytime
9a4228d906
Added unit tests for new _validate_name function and adjusted regex
2015-08-27 11:17:28 -06:00
Nitin Madhok
b2a1ec25e7
Lint fix
2015-08-21 06:46:41 -04:00
Nitin Madhok
df85bf351b
Skip the unit tests that need pyVmomi installed if it is not present
2015-08-21 06:20:18 -04:00
Nitin Madhok
57c103d70e
Adding more unit tests
2015-08-13 10:44:46 -04:00
Nitin Madhok
020994bb07
Fix lint
2015-08-13 09:30:27 -04:00
Nitin Madhok
5b05740dd4
Adding additional unit tests
2015-08-13 09:27:42 -04:00
Nitin Madhok
a88be9f756
Splitting asserts in multiple line for readability
2015-08-13 07:27:16 -04:00
Nitin Madhok
af4c058bd8
Adding more unit tests for vmware cloud driver
2015-08-13 07:07:11 -04:00
Nitin Madhok
e687434b0c
Adding more unit tests for create_datacenter and create_cluster
2015-08-13 02:10:43 -04:00
Nitin Madhok
6cc5f97e92
Lint Fix
2015-08-12 10:47:49 -04:00
Nitin Madhok
f0c2b9c5ef
Lint fix
2015-08-12 10:47:10 -04:00
Nitin Madhok
416a95cad6
Initial commit of unit tests for vmware cloud driver
2015-08-12 10:44:20 -04:00
Nitin Madhok
a8bfe5ec1f
Initial commit of unit tests for vmware cloud driver
2015-08-12 10:30:14 -04:00
rallytime
a3b673cfca
Pylint fix
2015-08-11 09:23:28 -06:00
rallytime
14fe0b88af
Add more unit tests to the OpenNebula driver
2015-08-10 17:15:38 -06:00
rallytime
8ae98b2bf4
Remaining template_* unit tests for OpenNebula
2015-08-07 16:34:05 -06:00
rallytime
fa58787227
Unit tests for vn_* functions for the OpenNebual driver
2015-08-07 16:10:55 -06:00
rallytime
7855a388e3
Wrote more unit tests for the OpenNebula driver
...
Also fixed a couple of minor bugs found along the way.
2015-08-07 15:12:04 -06:00
rallytime
a639c28050
Added more unit tests to OpenNebula driver
...
Also fixed some minor bugs found along the way.
2015-08-06 17:22:51 -06:00
rallytime
3811332a80
Add more OpenNebula unit tests
2015-08-05 16:42:14 -06:00
rallytime
1b5a9bc91d
Pylint fix
2015-08-05 10:05:29 -06:00
rallytime
78ea0f246e
Started writing unit tests for OpenNebula driver
...
Also fixed up some inconsistencies and bugs found along the way
2015-08-04 16:45:09 -06:00
Alexander Schwartz
f5b1734782
fixing problem in unit test
2015-05-17 17:09:35 +00:00
Alexander Schwartz
cba47f6856
make saltify to use standard boostrap procedure, therefore providing all options like master_sign_pub_file
2015-05-17 18:16:43 +02:00