Commit Graph

3135 Commits

Author SHA1 Message Date
Seth House
2775edc176 Saltnado /run fix (#32590)
* Revert "Verify auth in saltnado run (#32552)"

This reverts commit b19c5a5ce7.

* Call runner.cmd_async instead to enforce eauth

* Check for both token or user/pass before giving to Salt

* Remove comment as we're now enforcing auth here

* Lint and functionality fix courtesy of Mike P.

* Don't fail the whole request if there's an eauth problem
2016-04-22 10:10:47 -06:00
rallytime
c0d83d558d Don't use id as variable 2015-08-25 11:03:30 -06:00
rallytime
2b4bc1679d Keep ec2 instance creation test the same - it works better for the ec2 output 2015-08-25 11:01:02 -06:00
rallytime
b5b58eb31f Skip digital ocean tests since we can't use API v1 with v2 tests 2015-08-25 10:44:28 -06:00
rallytime
9ae1539c62 Update cloud tests to be more efficient and accurate 2015-08-25 09:49:32 -06:00
justinta89
bdb7a19c36 Fixed ps module to not use depreciated psutil commands 2015-06-24 11:31:07 -06:00
Justin Findlay
6ec87ce9f5 Merge pull request #23551 from dr4Ke/grains.append_unit_tests
grains.append unit tests, related to #23474
2015-05-11 15:54:24 -06:00
Christophe Drevet-Droguet
ebff9df5b2 fix pylint errors 2015-05-11 21:21:10 +02:00
Christophe Drevet-Droguet
c4954046ad unit tests for grains.append module function
- separate test functions for every return
- add tests for nested lists
- add test for appending to an element of a list (fails silently)
2015-05-10 17:27:32 +02:00
Christophe Drevet-Droguet
0c9a32326c use MagickMock 2015-05-09 18:34:02 +02:00
Christophe Drevet-Droguet
c838a22377 unit tests for grains.append module function 2015-05-08 21:01:36 +02:00
Mike Place
e98e65e787 Fix tests 2015-05-05 08:20:41 -06:00
Justin Findlay
ffd18493e8 compare OrderedDicts in serializer unit test 2015-04-28 13:30:16 -06:00
Thomas S Hatch
a178d444b8 Merge pull request #22946 from s0undt3ch/2014.7
Test with a more recent pip version to avoid a traceback
2015-04-22 10:25:17 -06:00
Pedro Algarvio
bc87749e2c Test with a more recent pip version to avoid a traceback
```
07:39:05,449 [salt.minion                                :1178][ERROR   ] A command in 'pip.list' had a problem: Traceback (most recent call last):
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/bin/pip", line 9, in <module>
    load_entry_point('pip==1.3.1', 'console_scripts', 'pip')()
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pkg_resources/__init__.py", line 546, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2666, in load_entry_point
    return ep.load()
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2339, in load
    return self.resolve()
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2345, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/__init__.py", line 13, in <module>
    from pip.commands import commands, get_similar_commands, get_summaries
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/commands/__init__.py", line 6, in <module>
    from pip.commands.bundle import BundleCommand
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/commands/bundle.py", line 5, in <module>
    from pip.commands.install import InstallCommand
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/commands/install.py", line 5, in <module>
    from pip.req import InstallRequirement, RequirementSet, parse_requirements
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/req/__init__.py", line 3, in <module>
    from .req_install import InstallRequirement
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/req/req_install.py", line 20, in <module>
    import pip.wheel
  File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/wheel.py", line 23, in <module>
    from pip.exceptions import InvalidWheelFilename, UnsupportedWheel
ImportError: cannot import name InvalidWheelFilename
```
2015-04-22 16:13:58 +01:00
Viet Hung Nguyen
b13db32fde add test for #18843 2015-04-22 16:21:23 +07:00
Justin Findlay
03af523de9 Merge pull request #22853 from s0undt3ch/2014.7
Don't assume package installation order.
2015-04-20 20:42:41 -06:00
Pedro Algarvio
b62df62151 Don't assume package installation order.
Additionally pep8 when installed using wheel, reports the version
together with the name.
2015-04-20 14:45:25 +01:00
Thomas S Hatch
2481e6cc63 Merge pull request #22464 from jacksontj/2014.7
2014.7: Fix Batching
2015-04-10 09:11:25 -06:00
Pedro Algarvio
1181a50d0d Don't assume we're running the tests as root 2015-04-10 00:52:32 +01:00
Thomas Jackson
77395d76d8 Change to sets, we don't gaurantee minion ordering in returns 2015-04-09 09:06:59 -07:00
Thomas Jackson
7614f7ed10 Caste returns to sets, since we don't care about order. 2015-04-09 07:45:24 -07:00
Thomas Jackson
30db262481 Add timeout to batch tests 2015-04-08 07:53:54 -07:00
Justin Findlay
56364ff571 adding cmd.run state integration tests 2015-04-06 20:32:22 -06:00
Pedro Algarvio
ff4aa5b989 Include unless in the state internal keywords.
Fixes #22359
2015-04-05 01:00:08 +01:00
Joshua Semar
a5b28ad24d fix tests return value 2015-03-30 16:42:19 -05:00
Joshua Semar
95aa3518d5 fix cas behavior on data module
data.cas was not saving changes.  We now call dump after
receiving the change
2015-03-30 16:01:28 -05:00
Evan Borgstrom
181df2e489 Fix a bug with the implicit list handling in pyobjects requisites
When specifying a requisite and you only need to list a single item you
can specify it without being wraped in a list and we will handle it
automatically.  This was being handled when we built our attrs to output
the final data, but this failed when you extended a require requisite
inside of a context manager.
2015-03-27 21:04:00 -07:00
Evan Borgstrom
3223a15f83 This fixes #21796
From the Python docs on the exec statement:

> Remember that at module level, globals and locals are the same dictionary.
> If two separate objects are given as globals and locals, the code will be
> executed as if it were embedded in a class definition.

We were providing a specific object for locals and in the specific case
reported in #21796 this caused a very strange name error when used in a
specific way. By removing the explicit locals dictionary and just having the
globals dictionary be shared fixes the issue, and we weren't using the
specific locals anyway.
2015-03-21 07:58:14 -07:00
Colton Myers
e386db2c34 Update syndic_config test for new cachedir 2015-03-19 11:33:09 -06:00
Thomas S Hatch
55a35c809d Merge pull request #21755 from jacksontj/2014.7
Add timeout to saltnado's event listener
2015-03-18 11:49:38 -06:00
Thomas Jackson
234d02b218 Add timeout to saltnado's event listener
Fixes #21707

The issue is basically that the master has seen N minions-- and not all N are currently connected. The publish job returns to the salt-api that N minions got the job-- and it dutifilly waits for all the returns. With this we use the same ping timeout that the CLI does while waiting for returns. So once all minions are no longer running the job we will return.
2015-03-18 08:09:41 -07:00
Justin Findlay
5f143ecb60 unit tests for states.archive.extracted tar opts
Implements tests for #20795.
2015-03-17 20:40:20 -06:00
Justin Findlay
53c9d48331 fix typo 2015-03-17 19:58:05 -06:00
Justin Findlay
f735f0b96d add eauth pam group tests
Adds test for #17380.
2015-03-17 14:25:57 -06:00
Alexander Schwartz
5f11f7b74c added tests to ensure commands are created accordingly (without additional single quotes) 2015-03-16 14:49:09 -06:00
Thomas S Hatch
4873382184 Merge pull request #21487 from rallytime/bp-21469
Backport #21469 to 2014.7
2015-03-11 15:05:08 -06:00
Ross Perkins
d473408074 composer.install module does not support always_check, only the state does. Removing the test on the module. 2015-03-11 12:19:17 -07:00
Ross Perkins
3f3218d853 Fix for issue #21491 2015-03-11 11:33:39 -07:00
Ross Perkins
8083cf554d Backport of PR #21358 to 2014.7 2015-03-10 09:38:16 -07:00
Vincent Desjardins
d5293901bc fixes #20198: virt.get_graphics and virt.get_nics calls in module virt 2015-03-10 09:17:48 -06:00
Viet Hung Nguyen
2a845989b7 bugfix: fix test mode in ssh_known_hosts
- present func: should not require key/fingerprint.
  In normal mode, key AND fingerprint can be omitted but
  test mode requires them, so fix the test mode to behave same
  way.
- absent function: return correct ret when change suppose to be made.
- refactor a bit.
2015-03-07 00:58:32 +07:00
Justin Findlay
a6b86ef627 indent quoted code in cmdmod tests 2015-03-02 16:08:49 -07:00
Justin Findlay
17b8f73f1b add cmd module integration tests 2015-02-27 16:30:05 -07:00
Thomas S Hatch
87c6e0cbe9 Merge pull request #21023 from rallytime/bp-19303
Backport #19303 to 2014.7
2015-02-25 18:07:00 -07:00
rallytime
565f10959d Add transport key to mocked opts to fix batch unit tests 2015-02-25 13:51:25 -07:00
Mike Place
90eb36eba6 Merge pull request #20992 from jfindlay/pub_args
fix arg preparation for publish module
2015-02-25 09:39:33 -07:00
Mike Place
011f8c4e72 Adjust batch test 2015-02-25 09:32:03 -07:00
rallytime
e5c4cf8ab4 Move tearDown functionality into test_instance
The new functions don't need to perform the tearDown behavior,
so that insurance should just be moved the function that needs it.
2015-02-24 16:42:00 -07:00
rallytime
b2bc55f150 Add some more tests to catch API changes for digital ocean 2015-02-24 16:33:31 -07:00