Commit Graph

36 Commits

Author SHA1 Message Date
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
rallytime
3273bbdab7
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/ref/configuration/master.rst
  - doc/ref/modules/all/index.rst
  - doc/topics/grains/index.rst
  - doc/topics/releases/2016.3.4.rst
  - doc/topics/spm/spm_formula.rst
  - doc/topics/tutorials/cron.rst
  - doc/topics/tutorials/index.rst
  - doc/topics/tutorials/stormpath.rst
  - salt/engines/slack.py
  - salt/log/handlers/fluent_mod.py
  - salt/modules/cyg.py
  - salt/modules/junos.py
  - salt/modules/namecheap_dns.py
  - salt/modules/namecheap_domains.py
  - salt/modules/namecheap_ns.py
  - salt/modules/namecheap_ssl.py
  - salt/modules/namecheap_users.py
  - salt/modules/reg.py
  - salt/modules/tomcat.py
  - salt/modules/vault.py
  - salt/modules/win_file.py
  - salt/modules/zpool.py
  - salt/output/highstate.py
  - salt/renderers/pass.py
  - salt/runners/cache.py
  - salt/states/boto_apigateway.py
  - salt/states/boto_iam.py
  - salt/states/boto_route53.py
  - salt/states/msteams.py
  - salt/states/reg.py
  - salt/states/win_iis.py
  - tests/integration/modules/test_cmdmod.py
  - tests/integration/states/test_user.py
  - tests/support/helpers.py
  - tests/unit/cloud/clouds/test_openstack.py
  - tests/unit/fileserver/test_gitfs.py
  - tests/unit/modules/test_junos.py
  - tests/unit/pillar/test_git.py
  - tests/unit/states/test_win_path.py
  - tests/unit/test_pillar.py
  - tests/unit/utils/test_format_call.py
  - tests/unit/utils/test_utils.py
  - tests/unit/utils/test_warnings.py
2018-06-01 14:54:12 -04:00
Erik Johnson
93ee5ee2b0
Fix all Sphinx warnings
Well, all but one, which we expect to see
2018-05-31 15:28:25 -05:00
Bo Maryniuk
634695fb11 Lintfix: E9402 (blacklisted module usage) 2018-01-29 14:09:59 +01:00
Bo Maryniuk
2acff9d49d Fix docstring 2018-01-26 15:01:01 +01:00
Bo Maryniuk
63cf21730c Remove garbage code 2018-01-26 14:59:57 +01:00
Bo Maryniuk
2c2be36647 Use parenthesis for multiline imports 2018-01-26 14:59:30 +01:00
Bo Maryniuk
764534f685 Add print_function and unicode_literals 2018-01-26 14:57:36 +01:00
Agnes Tevesz
a517550bc3 Added to tests.modules.test_vsphere the esxvm compatibility for tests 2017-12-01 11:23:27 +01:00
Nicole Thomas
a9dc04fb7f Lint: disable the unused-import check 2017-10-05 08:51:16 -04:00
Eric Radman
0dc3c4ef1c
Skip some vsphere tests if pyvmomi library is not installed
Also fix up 'E127: continuation line over-indented' lint errors
2017-10-04 13:09:29 -04:00
Alexandru Bleotu
b4a05dc7c0 Added tests for salt.modules.vsphere.remove_capacity_from_diskgroup 2017-09-29 13:39:44 -04:00
Alexandru Bleotu
ec2637db44 Added tests for salt.modules.vsphere.remove_diskgroup 2017-09-29 13:39:41 -04:00
Alexandru Bleotu
4e0755de20 Added tests for salt.modules.vsphere.remove_datastore 2017-09-29 13:39:39 -04:00
Alexandru Bleotu
51703a8a34 Added tests for salt.modules.vsphere.erase_disk_partitions 2017-09-29 13:39:36 -04:00
Alexandru Bleotu
b6577e4328 pylint 2017-09-25 18:25:04 -04:00
Alexandru Bleotu
58445e927b Updated all vsphere tests to support the vcenter proxy 2017-09-25 18:24:51 -04:00
Alexandru Bleotu
71b10b81f9 Added tests for salt.modules.vspere.rename_datastore 2017-09-20 06:28:26 -04:00
Alexandru Bleotu
c3d6af502b Added tests for modules.vsphere.list_cluster 2017-09-14 12:47:34 -04:00
Alexandru Bleotu
15a2499d27 Added tests for salt.vsphere._get_proxy_target 2017-09-14 10:52:28 -04:00
Alexandru Bleotu
0222a5a056 Fix to vsphere tests 2017-09-12 18:43:08 -04:00
Alexandru Bleotu
afa4921d37 Fixed vsphere tests to support the esxcluster proxy 2017-09-12 18:43:05 -04:00
Alexandru Bleotu
c565ed94dd Merge branch 'develop' into esxdatacenter_proxy-gh 2017-07-25 23:36:25 +01:00
Alexandru Bleotu
500899bc12 Fix tests #2 2017-07-21 08:18:57 +01:00
Alexandru Bleotu
7f52358eac Fixed test 2017-07-21 00:07:42 +01:00
Alexandru Bleotu
632cbf69b4 Fixed pylint 2017-07-20 22:22:24 +01:00
Alexandru Bleotu
89f4f324e6 Added tests for salt.modules.vsphere.create_datacenter 2017-07-19 17:20:24 +01:00
Alexandru Bleotu
b0aafe1632 Added tests for salt.modules.vsphere.list_datacenters_via_proxy 2017-07-19 17:20:23 +01:00
Alexandru Bleotu
6814e8405d Added tests for supporting esxdatacenter proxy in modules.vsphere 2017-07-19 15:24:10 +01:00
Pedro Algarvio
abe608d739
Drop @patch usage 2017-04-28 13:36:42 +01:00
Pedro Algarvio
d397763553
Adjust to the new LoaderModuleMockMixin usage 2017-03-28 19:03:59 +01:00
Pedro Algarvio
cb532fb9ef
Code cleanup. Proper mocking. 2017-03-28 19:02:50 +01:00
Pedro Algarvio
9b1e55aa85
Import the full module namespace to avoid import shadowing.
https://github.com/saltstack/salt/pull/39996#issuecomment-287857698
2017-03-28 19:02:47 +01: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