Commit Graph

1041 Commits

Author SHA1 Message Date
rallytime
5597b1a30e Skip 2 failing tests in Python 3 due to upstream bugs 2017-08-15 14:26:44 -04:00
rallytime
6ae1111295 Replace @mock_ec2 calls with @mock_ec2_deprecated calls
moto versions >= 1.0.0 have changed the way the mocked connections through
boto are handled with the @mock_ec2 decorator. They use the boto3 connection
method. However, since we are still using boto in many places, we need to use
the new @mock_ec2_deprecated decorator instead to handle the boto connection
functions for the unit tests.

Versions of moto < 1.0.0 are not Python 3 compatible, so salt-jenkins should
be installing newer versions of moto for those tests. Unfortunately, we cannot
install an older version of moto for Python2 that use the original @mock_ec2 call
and also import the @mock_ec2_deprecated function for newer versions of moto
simultaneously as the @mock_ec2_deprecated function doesn't exist in older
versions of moto.
2017-08-15 14:22:59 -04:00
Andrew Bulford
9eea796da8 Add regression tests for #41982
These test the scenarios where another network with a similar name
already exists, verifying that network_absent doesn't attempt to remove
a network which isn't specified, and network_present still attempts to
create the specified network despite a similarly named network already
being present.
2017-06-30 11:03:45 +01:00
Andrew Bulford
3369f0072f Fix broken unit test test_network_absent
This started failing following commit 515c612, which relied on the
'Name' key being present in the return value of dockerng.networks -
as the mock didn't have this set the test started failing.
2017-06-30 11:01:10 +01:00
Sébastien Wains
fae41c2875 Adjusting SVN unit test 2017-06-14 13:40:50 -06:00
Sean Jenkins
095e5949a3 Fix unit tests for PR #41509 2017-05-31 17:22:07 -06:00
rallytime
9b84b751b2 Pylint fixes 2017-05-26 12:38:38 -06:00
Petr Michalec
6db8915021 Endpoint handling per region, fixes #35874
- extend tests for multiple regions
- region arg by default set to None
- print verbose changes to be exec.
2017-05-26 11:15:29 -06:00
Benjamin Drung
33a7f8b2ec Fix typos
lintian found several spelling errors.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2017-05-24 12:50:29 +02:00
Anthony Shaw
2f610680e5 remove unused imports 2017-05-12 16:38:30 -06:00
Anthony Shaw
9b7de2e7d7 fix unit tests 2017-05-12 16:37:26 -06:00
Anthony Shaw
49d94559ab linting 2017-05-12 16:36:07 -06:00
Anthony Shaw
4b260a4594 linting 2017-05-12 16:36:07 -06:00
Anthony Shaw
41d1adab5f fix up tests 2017-05-12 16:36:06 -06:00
lomeroe
2af89f2165 update mock data 2017-05-10 10:33:34 -05:00
lomeroe
b7fa115a59 update win_dns_client tests with correct module names 2017-05-10 10:33:33 -05:00
Theophile Meneau
d8766562c9 fix incorrect service.running success response
when enable=None and init script returns 0,
but service failed to start.

Fixes #41125
2017-05-08 10:25:21 -04:00
Erik Johnson
ffe4bc3d5c update unit test to reflect new behavior 2017-05-06 01:29:49 -05:00
Daniel Wallace
a61fc824c4 use loader for war extraction
Also set the version added in the docs
2017-04-13 11:51:22 -06:00
Mike Place
92b5f03beb Merge pull request #40551 from terminalmage/issue39868
Fix four issues in archive.extracted state
2017-04-12 12:37:51 -06:00
Daniel Wallace
b0bd99c26d add comment and unit test 2017-04-11 21:08:06 -06:00
Erik Johnson
5ea1f607b0 Fix mocking in unit tests 2017-04-10 13:57:39 -05:00
rallytime
8f084f7056 Update unit test to look for actual string comment 2017-03-31 15:34:24 -06:00
Mike Place
2d2cb5b837 Merge pull request #40333 from gtmanfred/2016.11
fix some test=True comments
2017-03-28 10:11:00 -06:00
Daniel Wallace
5596620dfb fix some test=True comments
Alternatives should say it is setting the symlink to `path` instead of
`current` which it is already set to

ssh_auth.absent should say it is going to remove the key, unless the status is
set to `add`, then it is already absent

Fixes #40322
Fixes #40321
2017-03-27 18:19:52 -05:00
rallytime
a9c5eebaf0 Clean up dockerng unit tests to avoid global variables and fixup some patching 2017-03-23 12:44:57 -06:00
Erik Johnson
6caedb0de8 Change imports for dockerng tests
This should fix path issues in the test suite.
2017-03-21 11:56:29 -05:00
rallytime
c613d19e76 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/dockerng.py
  - salt/states/dockerng.py
2017-02-21 13:59:14 -07:00
Mike Place
e652a45592
Fix mocks in win_disim tests 2017-02-16 12:26:49 -07:00
nicholasmhughes
8d8ba9c7d2 added the new getconfig function to the test 2017-02-06 09:55:09 -05:00
Erik Johnson
d10c068e25 Update archive state unit tests to reflect symlinks in archive.list 2017-01-20 08:49:40 -06:00
Mike Place
aa0c843553 Merge pull request #38461 from alprs/fix-kapacitor_changes
Improvements/fixes to kapacitor task change detection
2016-12-29 10:08:46 -07:00
Andreas Lutro
52721e97d6 clean up and fix tests 2016-12-29 11:14:24 +01:00
twangboy
e96bfe8fa2 Change OSX/OS X to macOS where possible 2016-12-28 14:49:46 -07:00
Erik Johnson
79231a5d8a archive.extracted: don't try to cache local sources (#38285)
* archive.extracted: don't try to cache local sources

This will keep us from trying to cache file when we already have it
locally, which will help significantly with larger archives.

* Update tests to reflect change in cache behavior

* Add mock return for /bin/tar

This fixes failing tests for Ubuntu 14
2016-12-19 14:37:58 -07:00
Erik Johnson
845e3d0e75 Update tests to reflect change in cache behavior 2016-12-16 14:09:48 -06:00
Mike Place
6c1ca9dae7 Merge pull request #38236 from gtmanfred/2016.11
SELINUXTYPE should not be changed
2016-12-15 03:37:06 -07:00
Daniel Wallace
d1b070c894 clean up selinux unit test 2016-12-14 11:33:00 -06:00
rallytime
fec9dec23a Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/win_pkg.py
  - tests/unit/daemons_test.py
  - tests/unit/states/file_test.py
2016-12-06 16:23:51 -07:00
rallytime
186e2d0d03 Don't allow libcloud mock module injection in unit/states/libcloud_dns_test.py either 2016-12-06 09:24:07 -07:00
rallytime
1da7aacfbe Update unit tests to account for additional file.search call
Also removed some mocks that were not needed anymore for the
calls to ``file.contains_regex_multiline`` because that function
is no longer called in the state file.
2016-12-02 11:22:10 -07:00
rallytime
dfedd1185a Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/grains/core.py
  - salt/modules/ddns.py
  - salt/templates/rh_ip/network.jinja
2016-11-28 11:08:19 -07:00
Daniel Boughton
ddc238df36 Fixed augeas_test.py to match True v.s. None for test_change_in_test_mode 2016-11-27 08:40:05 -05:00
kevin
1865b13645 Fix 'present' option when used without 'key_type' 2016-11-14 12:16:51 -07:00
rallytime
4c245a3fa5 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/x509.py
2016-11-10 16:51:52 -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