Commit Graph

35 Commits

Author SHA1 Message Date
Erik Johnson
4b5a393445
Update junos tests to reflect changes to mock_open 2018-06-18 00:21:25 -05: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
8cb33d3dec
Quiet the linter
We need this import to determine whether we have the needed modules to
run the test, even though it is not invoked directly.
2018-05-31 15:28:25 -05:00
Erik Johnson
b9ace5a859
Fix crappy mocking
This fixes some poorly-conceived mocking that was done because of some
equally dumb imports being done in salt/modules/junos.py (which I fixed
a few commits ago while in the process of cleaning up the docs).
2018-05-31 15:28:25 -05:00
Erik Johnson
bc9e3acef3
Lint fixes 2018-05-31 15:28:25 -05: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
rallytime
54e154b62f
Fix test errors created with unicode changes
- jboss_cli test: reduce test complication by not mixing raw and \u
- remove one test from test_junos: it's not really testing anything since it's heavily mocked
2018-01-23 15:48:42 -05:00
rallytime
c08c67f3d4
Add unicode_literals to modules, states, and related tests 2018-01-23 15:26:25 -05:00
Erik Johnson
7b13a7df8b
Replace json module usage with a helper to ensure unicode content is handled properly
This adds wrappers for json.dump{,s} which disable `ensure_ascii` by
default.
2017-12-27 09:30:58 -06:00
rallytime
f20f3742cb Merge branch '2017.7' into 'develop'
Conflicts:
  - tests/unit/test_crypt.py
2017-08-07 10:43:06 -04:00
Mike Place
834d6c605e
Set fact gathering style to 'old' for test_junos
Without this, we stacktrace because it does not appear that setting
'gather_facts' to False prevents the library from assuming the presence
of facts. I believe this to be an upstream bug with jnpr.

Because they have listed this as being a deprecated option in the future
this may re-break in the future.
2017-08-02 23:11:52 -06:00
rallytime
89d957b124 Update unit test mocks for salt.utils.files.fopen 2017-07-18 13:40:07 -06:00
rallytime
ccf790a83f Update all references for moved functions to use "files" util
- fopen
- flopen
- fpopen
- safe_rm
- is_empty
- is_fcntl_available
2017-07-18 10:31:01 -06:00
Dmitry Kuzmenko
5a1bdd368e Py3: minor tests updates
Correct skipping explanation and correctly disable by proper conditions.
BTW, mysql works on Py3. There's a port of python-mysql and test passes.
2017-06-20 16:59:38 +03:00
Jeremy McDermond
3e481cb764 JunOS: Fix whitespace for PEP compliance 2017-05-16 10:00:58 -07:00
Jeremy McDermond
f1751d135a JunOS: Fix Unit Test
When adding the cp.get_file function, we need to add it into the list of
mock functions in the unit test along with get_template or the unit
tests will fail.
2017-05-16 10:00:50 -07:00
Pedro Algarvio
abe608d739
Drop @patch usage 2017-04-28 13:36:42 +01:00
Pedro Algarvio
a0245b049f
Proper mocking. 2017-04-01 14:22:59 +01:00
Pedro Algarvio
22b15a134e
Proper mocking. 2017-04-01 14:22:58 +01:00
Pedro Algarvio
83db7547e7
Proper mocking. 2017-04-01 14:22:55 +01:00
rajvidhimar
8d83d482c5 Correct the junos unit tests which mock getattr 2017-03-31 16:19:21 +05:30
rallytime
762e08634a Skip 2 junos module unit tests: "salt.modules.junos.getattr" patch stacktraces 2017-03-30 10:10:16 -06:00
vnitinv
a9acd532d1 fix lint in test_junos.py 2017-03-27 11:33:42 +05:30
rajvidhimar
f629feaabd Take care of import error and add condition to skip tests if PyEZ is not installed 2017-03-26 17:27:32 +05:30
rajvidhimar
2868755128 Remove usage of nose in junos unit tests 2017-03-22 17:08:19 +05:30
vnitinv
1b726b7f2e moving import unittest2 to unittest 2017-03-15 15:53:39 +05:30
rajvidhimar
dc2e3f4f2e Clean up lint 2017-03-15 10:42:10 +05:30
rajvidhimar
0393ffab1c Took care of commits 2017-03-14 17:51:17 +05:30
rajvidhimar
9c6b7279dc Fixed broken unit tests 2017-03-14 17:46:04 +05:30
rajvidhimar
beba5a7331 Clean up 2017-03-09 11:15:15 +05:30
rajvidhimar
d8363d0958 Unit tests 2017-03-09 10:48:42 +05:30
rajvidhimar
c49c8860ac More test cases 2017-03-08 00:25:41 +05:30
rajvidhimar
a5527f690f Fix tests 2017-03-07 16:14:23 +05:30
rajvidhimar
3abbcc4ad3 Bug fixes 2017-03-07 12:34:09 +05:30
rajvidhimar
6ff57331c5 Fix few bugs in the salt module 2017-03-07 12:29:09 +05:30