Pedro Algarvio
d8d9d14d5a
Fix the stateconf unit test. Refs #1775
2012-12-29 22:19:17 +00:00
Jeff Schroeder
8b74360493
Skip the git state tests if a dns lookup to github.com fails
...
This is the quickest clever thing I could think of while running the
unit tests offline in the car during a long road trip.
2012-12-21 23:32:11 -06:00
Jeff Schroeder
4da4dc25a1
Skip the virtualenv state test if virtualenv isn't installed
2012-12-21 21:35:58 -06:00
Ryan Schneider
8f8cc74b34
Some minor cleanup of unit and integration tests.
2012-12-18 17:39:16 -08:00
Pedro Algarvio
ab74952a37
Since salt versioning changed, so should the depending deprecations.
...
The are some output parser options which should be triggering warnings salt 0.10.6 and should start triggering failures when 0.10.7 came out. Adapt these dependable deprecations to the new versioning convention.
2012-12-15 00:13:31 +00:00
Thomas S Hatch
aa1c55f610
Add tests for pillar matching list objects Fix #2761
2012-12-12 16:37:21 -07:00
Thomas S Hatch
f94637b4b4
Add a pilla rlist to test advanced pillar matching
2012-12-12 16:30:17 -07:00
Thomas S Hatch
648e6b8eca
Fix eventlisten for changes made to 0.10.6
2012-12-12 13:14:13 -07:00
David Boucha
6765a56032
Use TMP_STATE_TREE
2012-12-12 11:49:28 -07:00
David Boucha
dbc5d4ca9c
Fixes #2594 Verify that changes in req file work
...
After the first invocation of this venv, new additions to the
requirements.txt would not be honored.
2012-12-12 11:49:28 -07:00
Pedro Algarvio
c0455f8fa9
Support creating state files at runtime.
...
We now support runtime created files that can be used like `salt://my-temp-file.txt`.
Just make sure you write them to `os.path.join(integration.TMP_STATE_TREE, 'my-temp-file.txt')`.
2012-12-12 18:38:39 +00:00
Pedro Algarvio
952779aa26
More code reuse in SaltReturnAssertsMixIn
.
...
The methods `assertSaltTrueReturn`, `assertSaltFalseReturn` and `assertSaltNoneReturn` now reuse the code from `__getWithinSaltReturn` making `__assertReturn` obsolete and for that removed.
2012-12-12 17:11:44 +00:00
Pedro Algarvio
b9e72e7c3c
Abstract SaltReturnAssertsMixIn
to allow more tests using it.
...
* Created a method which gets a deep keyed value in a salt state return. For example, allow getting, `ret['changes']['new']`.
* Created a method which tries to make sure the correct type of the passed keys for the above added method.
* Also added were the methods, `assertInSaltReturn`, `assertNotInSaltReturn`, `assertInSaltReturnRegexpMatches`, which simplified the existing `assertInSaltComment`, `assertNotInSaltComment`, `assertSaltCommentRegexpMatches`, `assertSaltStateChangesEqual` and `assertSaltStateChangesNotEqual`, also allowing to do similar tests in every key(deep or not) of a salt state return dictionary.
2012-12-12 13:38:03 +00:00
Pedro Algarvio
7c6feb8c18
Fix a bug! It's basestring
not string
.
2012-12-12 00:33:54 +00:00
Joseph Hall
d0f101650d
Give each minion its own pkidir (still using identical keys)
2012-12-11 14:41:40 -07:00
Ramón Cahenzli
a30f2ee244
This root or that root? :)
2012-12-11 16:37:30 +01:00
Pedro Algarvio
f76facf045
Missed one logging handler method.
2012-12-11 12:57:06 +00:00
Thomas S Hatch
9d427c868d
Merge pull request #2861 from s0undt3ch/hotfix/headers
...
Header updates. More copyright to the SaltSatck team. Code author to me(where applicable).
2012-12-11 04:50:37 -08:00
Pedro Algarvio
8c2cadcc13
Mimic some logging handler attributes and methods.
2012-12-11 12:18:48 +00:00
Pedro Algarvio
64a0d631e1
Fix rvm unit tests.
2012-12-11 11:27:21 +00:00
Pedro Algarvio
7c5a5d0bd3
Header updates. More copyright to the SaltSatck team. Code author to me(where applicable).
2012-12-11 10:23:37 +00:00
Pedro Algarvio
8d092afddc
Don't assume digits in logging format strings. Refs #2859 , fixes #2853 .
...
Sorry @ryanschneider for stepping in on your fix.
Nothing is assumed now, and several checks are made. If any of the checks fail, nothing else is done in `salt.log.Logging.__new__()`.
Added a test case which will take care of possible regressions on this bug fix.
2012-12-11 10:10:03 +00:00
Thomas S Hatch
17ee950955
Merge branch 'small-changes' of git://github.com/holmboe/salt into holmboe-small-changes
...
Conflicts:
salt/modules/systemd.py
2012-12-08 21:52:51 -07:00
Henrik Holmboe
5bcce96761
Update import in unit test.
...
https://travis-ci.org/holmboe/salt/jobs/3563157
2012-12-08 10:37:26 +01:00
Henrik Holmboe
a607016198
Update import in unit test.
...
https://travis-ci.org/holmboe/salt/jobs/3563086
2012-12-08 09:44:51 +01:00
Pedro Algarvio
5ca7762784
Don't switch assertion case. Fix test.
2012-12-07 19:05:19 +00:00
Pedro Algarvio
871516b4cf
Migrated test.integration.modules.state
to use SaltReturnAssertsMixIn
.
2012-12-07 18:44:06 +00:00
Pedro Algarvio
4348734697
Add integration.SaltReturnAssertsMixIn
where it was lacking in previous commits.
2012-12-07 17:13:58 +00:00
Pedro Algarvio
0baa63c19f
Remove deprecated tests functions.
...
Removed `ModuleCase.assert_success()` and `ModuleCase.state_result()` which are now better tested using `SaltReturnAssertsMixIn`
2012-12-07 17:09:11 +00:00
Pedro Algarvio
e03a2606a1
Migrated test.integration.states.supervisord
to use SaltReturnAssertsMixIn
.
2012-12-07 17:03:24 +00:00
Pedro Algarvio
cbea092b0c
Migrated test.integration.states.rabbitmq_*
to use SaltReturnAssertsMixIn
.
2012-12-07 17:01:31 +00:00
Pedro Algarvio
fc3b272809
Migrated test.integration.states.pip
to use SaltReturnAssertsMixIn
.
...
* Added `assertSaltCommentRegexpMatches()` to `SaltReturnAssertsMixIn` to add the ability to match salt comments using regular expressions.
2012-12-07 16:59:24 +00:00
Pedro Algarvio
156ce07bde
Migrated test.integration.states.host
to use SaltReturnAssertsMixIn
.
2012-12-07 16:35:20 +00:00
Pedro Algarvio
c1c3b31d0b
Migrated test.integration.states.git
to use SaltReturnAssertsMixIn
.
2012-12-07 16:33:38 +00:00
Pedro Algarvio
b210d59eb8
Migrated test.integration.states.file
to use SaltReturnAssertsMixIn
.
2012-12-07 16:25:26 +00:00
Pedro Algarvio
4b1747468b
Adapted tests.integration.states.ssh
to use SaltReturnAssertsMixIn
.
...
* Two new methods were added to `SaltReturnAssertsMixIn`, `SaltReturnAssertsMixIn.assertSaltStateChangesEqual()` and `SaltReturnAssertsMixIn.assertSaltStateChangesNotEqual()`, in order to be able to test salt state returns. These methods, besides asserting that the state was correctly applied using `SaltReturnAssertsMixIn.assertSaltTrueReturn()`, are also able to test for what's in the `changes` key of salt's return, it can even "go inside" the `changes` dictionary, just have a look at what was done in `tests.integration.states.ssh`.
2012-12-07 12:46:02 +00:00
Pedro Algarvio
6c22f65a56
test_issue_2731_masterless()
should clean-up after.
2012-12-05 21:24:19 +00:00
Pedro Algarvio
957f9c61b7
Quiet down these tests a little bit.
2012-12-04 19:14:35 +00:00
Pedro Algarvio
2d15b79114
Fix sync minions Process target. Correct sync'ed output.
2012-12-04 17:36:45 +00:00
Pedro Algarvio
65094c744a
Stop using py27_subprocess
under python 2.6
2012-12-04 16:29:53 +00:00
Pedro Algarvio
42799e0953
Fix '--clean/--no-clean' logic needed to sync minions.
2012-12-04 13:36:33 +00:00
Pedro Algarvio
f66c7741ff
Allow more time for minions to sync.
2012-12-04 13:02:56 +00:00
Pedro Algarvio
a004639b99
Reuse getting a local client code with SaltClientTestCaseMixIn
.
2012-12-04 11:51:37 +00:00
Pedro Algarvio
e2d404950b
Show us the pid for which the test suite is running under.
2012-12-04 11:24:24 +00:00
Pedro Algarvio
08aaecee12
Merge branch 'develop' of github.com:saltstack/salt into hotfix/gdb-resources
2012-12-04 00:55:50 +00:00
Pedro Algarvio
b0f594f452
run_script
timeout's are not supported under windows.
2012-12-03 23:58:08 +00:00
Pedro Algarvio
3b0388c8f4
Merge branch 'develop' of github.com:saltstack/salt into hotfix/gdb-resources
2012-12-03 23:42:23 +00:00
Pedro Algarvio
b866ca3af0
Just detach from parent group.
2012-12-03 23:41:45 +00:00
Pedro Algarvio
9e89f357aa
Remove unused code.
2012-12-03 23:36:20 +00:00
Pedro Algarvio
5d274e8b7d
Let's keep using multiprocessing.
2012-12-03 23:35:32 +00:00
Pedro Algarvio
2246bf3d33
Remove unused code.
2012-12-03 23:32:58 +00:00
Pedro Algarvio
7b10a7cd64
Merge branch 'develop' of github.com:saltstack/salt into hotfix/gdb-resources
2012-12-03 23:31:29 +00:00
Pedro Algarvio
a9669acf3a
Kill tests run_script
shell and it's children.
2012-12-03 23:30:21 +00:00
Pedro Algarvio
c89a6788f4
Is this what's needed under python 2.6 for tests to complete?
2012-12-03 21:07:51 +00:00
Thomas S Hatch
f048e4cb54
Merge pull request #2773 from dekkers/fix-trailing-newline
...
Preserve the final newline in Jinja templates
2012-12-02 11:37:44 -08:00
Jeroen Dekkers
c123d8f824
Preserve the final newline in Jinja templates
2012-12-02 19:45:09 +01:00
Pedro Algarvio
bd930cddec
Include a test case for #2731
2012-12-01 23:00:27 +00:00
Pedro Algarvio
f51f35c148
Allow RedirectStdStreams
to behave correctly using with
. Allow flushing streams.
2012-12-01 22:59:43 +00:00
Pedro Algarvio
c4e485a8bf
Allow setting a max time for a test run_script
to execute and return.
2012-12-01 22:58:19 +00:00
Pedro Algarvio
c9cb4c220c
Only sync minions modules if they're not already up to date.
2012-12-01 18:12:59 +00:00
Pedro Algarvio
6c37923226
Remove extra space.
2012-11-30 17:33:20 +00:00
Pedro Algarvio
db344ea342
Fix integration.modules.django.DjangoModuleTest.test_collectstatic()
, PEP-8. Refs #2729 .
2012-11-30 17:13:12 +00:00
Henrik Holmboe
acc49904cd
Remove references to pub_refresh.
...
The configuration option was removed in 0.10.5.
2012-11-29 16:44:49 +01:00
Pedro Algarvio
804b575b0d
Add missing import.
2012-11-29 07:59:36 +00:00
Pedro Algarvio
b72469d4b0
New coverage version, handle it's version parsing properly.
2012-11-29 07:41:17 +00:00
Thomas S Hatch
1c2f4c96c4
Merge pull request #2730 from s0undt3ch/issues/2726
...
Fix #2726
2012-11-28 10:56:35 -08:00
Pedro Algarvio
d4005bee3d
We now warn the users about misusing mode
in file.recurse
. Fixes #2726 .
...
* Extended `SaltReturnAssertsMixIn` by adding `assertNotInSaltComment`.
* Fixed minor `tab` instead of spaces in `salt.states.file` code.
2012-11-28 17:57:44 +00:00
Pedro Algarvio
c782eae106
Extended SaltReturnAssertsMixIn
and included a test case which triggers #2726 .
...
* Extended `SaltReturnAssertsMixIn`, `assertInSaltComment`, which allows to see if a string is in a salt's returned comment.
2012-11-28 17:35:25 +00:00
Stanis Trendelenburg
2f8b122af5
Correctly handle empty group list in user.present
...
- In states.user.present, differentiate between None and empty list for
'groups': The empty list means the equivalent to passing '-G ""' to usermod,
i.e. remove all but the default group.
- In modules.useradd, always quote the value passed after the '-G' switch to
usermod and useradd, so they don't fail when we pass an empty string.
2012-11-28 01:28:42 +01:00
Pedro Algarvio
bd552ef4a8
Migrate some of the Vagrant branch improved minions wait and sync code.
2012-11-26 05:44:18 +00:00
Pedro Algarvio
74aeeab5e5
Add some color when a test minion connects(trigger a Travis build).
2012-11-26 04:32:25 +00:00
Pedro Algarvio
fd283e9689
Improved SaltReturnAssertsMixIn
.
...
* Added `assertReturnSaltType` which is dictionary for non errors.
* Added `assertReturnNonEmptySaltType` which does the above and makes sure it's not empty.
* Fix `tests.integration.states.user.UserTest` which was using wrongly using `assertSaltTrueReturn` on 'user.info' calls.
2012-11-25 22:29:08 +00:00
Pedro Algarvio
9e8d27e81b
Do assertSaltTrueReturn
on each of the salt calls.
2012-11-25 22:28:30 +00:00
Pedro Algarvio
ee8a4faccc
Make sure that parts are also dictionaries.
2012-11-25 20:11:24 +00:00
Thomas S Hatch
a343421f41
Merge pull request #2678 from s0undt3ch/develop
...
Add `tests.saltunittest.RedirectStdStreams`.
2012-11-23 08:53:31 -08:00
Pedro Algarvio
4fc12f58ee
Fix salt.utils.fopen
import error.
2012-11-23 12:33:28 +00:00
Pedro Algarvio
a6fd9bb60f
Add tests.saltunittest.RedirectStdStreams
.
...
* The `RedirectStdStreams` tests helper will allow to temporarily catch `stdout` and `stderr` output. Right now it's only used to **mute** the `tests.integration.runners.jobs.ManageTest.test_active()` output.
2012-11-23 12:19:09 +00:00
Johannes Martinsson
e1bc7f2b5a
Make remove in the file module also remove broken symlinks
...
The remove command in the file module had guard, `os.path.exists`, in
front of all remove actions. That guard failed on broken symlinks, i.e.
it returned `false` even though the broken symlink existed. Since the
remove actions are properly guarded without the `os.path.exists` guard,
this commits removes it. Now the remove command will also remove broken
symlinks.
2012-11-22 12:22:04 +01:00
Pedro Algarvio
cf03063bec
Improve SaltReturnAssertsMixIn
and move tests.integration.states.cmd
to use it.
...
* Implement `SaltReturnAssertsMixIn.assertSaltNoneReturn` used in `tests.integration.states.cmd`.
* Migrate `tests.integration.states.cmd` to use `SaltReturnAssertsMixIn`.
2012-11-21 12:43:53 +00:00
Pedro Algarvio
2010660d80
Move tests.integration.states.user
to use SaltReturnAssertsMixIn
.
2012-11-21 12:34:26 +00:00
Pedro Algarvio
3401445e8b
Expose what's happening behind the scenes for test_user_if_present_with_gid()
...
* Expose what's happening in `integration.states.user.UserTest.test_user_if_present_with_gid()`.
* Update code that was using the old `SaltReturnAssertsMixIn`.
2012-11-21 12:19:18 +00:00
Pedro Algarvio
1f03ba59f1
Extend tests.integration.SaltReturnAssertsMixIn
.
...
* Do proper type checking for salt calls, ie, a dict should be returned, if not, it's a failure, usually errors come as lists, show that to the user.
* Iterate through the salt call parts to make sure result is true, and if not, fail showing the part comment.
2012-11-21 12:16:17 +00:00
Pedro Algarvio
04146f39f9
Tests wait timer is now colored(option to disable colors is also available), improves readability.
2012-11-21 10:01:45 +00:00
Pedro Algarvio
73e29b6ba1
Merge branch 'develop' of github.com:saltstack/salt into develop
2012-11-21 09:45:03 +00:00
Pedro Algarvio
495e7244c8
Fix pip requirements file permissions in case of non root runas
.
...
* In `salt.modules.pip.install()` we first check if file is already cached(in case being called from `salt.states.virtualenv.managed()`), if it's not, then try to cache it.
* If requirements and `runas` is passed, since `salt.fileclient`'s cache needs to be private, we create a temporary file with the contents of the requirements file, owned by the `runas` user, which then gets passed to the pip command.
* Always delete the user, even if test(`integration.states.virtualenv.VirtualenvTest.test_issue_1959_virtualenv_runas`) fails.
* Minor PEP-8.
2012-11-21 09:08:22 +00:00
Thomas S Hatch
1e4103a8fd
Merge pull request #2646 from dcolish/develop
...
Add test to reproduce #2631
2012-11-20 08:19:23 -08:00
Pedro Algarvio
eda67f0110
Show salt comment on assertTrue(ret['result'])
failed calls.
...
* Created a mix which tests for the required assertion(True/False) and in case of a failure, shows salt comment kwarg in the raised assertion error so we know what was the original(salt's) failure.
2012-11-20 16:09:57 +00:00
Dan Colish
88ab2a6e74
Better to have a passing test even when there's an exception
2012-11-20 08:05:50 -08:00
Pedro Algarvio
f6abd10ed9
Support logging.StreamHandler
under python 2.6 which does not have a stream
kwarg.
2012-11-20 15:52:20 +00:00
Dan Colish
1110f2a1ac
Add test to reproduce #2631
2012-11-20 07:41:38 -08:00
Pedro Algarvio
4fdd8f4b8b
Make destructiveTest
decorated tests work when passed with -n
to runtests.
2012-11-20 12:22:23 +00:00
Thomas S Hatch
dfc90286a9
Merge pull request #2635 from s0undt3ch/features/use-py27-subprocess
...
Features/use py27 subprocess
2012-11-19 19:13:46 -08:00
Jack Kuan
190f4bd828
Fix a case when a single shorthand state is declared without arguments.
...
Also, now automatically adds the name argument, if one is not provided,
for states declared under a dot-prefixed state id.
2012-11-18 22:02:24 -05:00
Pedro Algarvio
09eb92ad8a
Only import what's needed, cleans up code.
2012-11-19 01:21:06 +00:00
Pedro Algarvio
6a6f256472
Make it, actually work, on python 2.6
2012-11-19 01:13:29 +00:00
Pedro Algarvio
c6dcdbe6dc
Hardcore approach to travis-ci failures under python 2.6.
...
* We basically copied subprocess from python 2.7 and import that one instead of the python 2.6 subprocess to run the tests. Since we import it under a different name, there should be no issues with the remaining of salt's source importing the regular subprocess module.
2012-11-18 23:49:37 +00:00
Pedro Algarvio
a6584f5180
Add python 2.7 subprocess module.
2012-11-18 23:24:55 +00:00
Pedro Algarvio
863bc7ef37
Add missing import.
2012-11-18 19:06:17 +00:00
Pedro Algarvio
c5fe83272f
Even more open()
to salt.utils.fopen()
.
2012-11-18 18:57:10 +00:00
Pedro Algarvio
f67d24cf30
Minor cosmetic change.
2012-11-17 17:43:23 +00:00
Pedro Algarvio
526ed994b8
Test for deprecation message first and then use the new --out
format.
2012-11-17 17:39:06 +00:00
Pedro Algarvio
5bf4549777
Use actual time, to reduce time.sleep()
inaccuracy.
2012-11-17 17:37:53 +00:00
Pedro Algarvio
bed55506c3
Proper OrderedDict
check.
2012-11-17 01:19:37 +00:00
Pedro Algarvio
89fd313766
Fix stateconf
test failing in 2.6 because OrderedDict
was not available.
2012-11-16 22:45:12 +00:00
Pedro Algarvio
52b0c1ba8e
Adapt cherry-picked 2dd188fa18abff3193450472af2192206907b3ba to the new output shell switch.
2012-11-16 18:01:01 +00:00
Pedro Algarvio
ee32784bb4
Make the salt-cp
shell test case work across multiple machines.
2012-11-16 18:00:51 +00:00
Thomas S Hatch
61c72dd2de
Merge pull request #2576 from s0undt3ch/issues/2566
...
Deprecate `--xxx-out` in favour of `--out/--output`
2012-11-15 21:25:21 -08:00
Pedro Algarvio
c60e4dd645
Fix tests and "convert" text output to "txt" when choosing outputter.
2012-11-16 00:07:08 +00:00
John Debs
4a062f1e69
Logic and test fixes for version, ri, rdoc support in gem state
2012-11-15 18:05:06 -05:00
Thomas S Hatch
c3c61b835a
Merge pull request #2555 from ryanschneider/cp.get_dir
...
Add gzip and template to cp.get_dir, expose make_dirs on cp.get_file
2012-11-14 18:22:09 -08:00
Ryan Schneider
2ccf589425
Refactor: make_dirs -> makedirs, gzip_compression -> gzip
2012-11-14 18:06:53 -08:00
Ryan Schneider
ad1a43012a
Add gzip and template to cp.get_dir, expose make_dirs on cp.get_file
2012-11-14 16:48:26 -08:00
Pedro Algarvio
e390bd92f4
Fix raw outputter test.
2012-11-15 00:03:31 +00:00
Pedro Algarvio
97b4dffd85
Re-add required import.
2012-11-14 16:03:46 +00:00
Thomas S Hatch
326904e020
An easy fix on opening files
2012-11-13 20:55:40 -07:00
Thomas S Hatch
48fd305391
Merge pull request #2544 from kjkuan/develop
...
sls_render_pipe merge clean ups
2012-11-13 19:29:39 -08:00
Pedro Algarvio
7c666d21d0
Need at least two worker threads for integration.modules.publish
to pass.
2012-11-13 19:10:17 +00:00
Jack Kuan
7f3ac3fe89
Add some docs on render pipe.
...
Also, added a stateconf state so that its stateconf.set function
can be used by the stateconf renderer.
2012-11-13 02:01:34 -05:00
Jack Kuan
a76331e0e1
Merge branch 'develop' of github.com:saltstack/salt into develop
2012-11-13 00:58:04 -05:00
Thomas S Hatch
6fce0a2353
Minor fixes for stateconf tests and sting updates
2012-11-12 22:20:37 -07:00
Thomas S Hatch
5b1bd0409b
Clean up some missing componets in console.py
2012-11-12 21:08:04 -07:00
Jack Kuan
804f0ca671
Merge branch 'develop' of github.com:kjkuan/salt into develop
2012-11-12 18:40:57 -05:00
Thomas S Hatch
042b2490c6
Clean up console.py
...
SINGLE QUOTES
Bare exceptions are bad
vars being used without being assigned
2012-11-12 16:36:25 -07:00
David Boucha
4a2ceb458e
set worker threads to 1 for testing
...
Travis CI is failing on python 2.6
Trying to lower total memory consumption so the tests
will pass
2012-11-12 16:22:05 -07:00
Jack Kuan
db451d5ed3
Update jinja template unit tests and remove obsolete salt.utils.jinja.get_template().
2012-11-12 17:08:14 -05:00
Thomas S Hatch
5d97b51ef2
Merge pull request #2528 from kjkuan/sls_render_pipe
...
Sls render pipe
2012-11-12 09:59:24 -08:00
Jack Kuan
7ad98acfb4
Fix stateconf unit test and the problem with sls_dir==''.
2012-11-12 00:50:46 -05:00
Jack Kuan
8cb70d0a6e
Update stateconf renderer module doc and revert names declaration support.
2012-11-12 00:16:03 -05:00
Pedro Algarvio
152088d727
Include another option into the test_salt_documentation_arguments_not_assumed
test.
2012-11-11 20:11:08 +00:00
Jack Kuan
0931455721
Merge branch 'develop', remote-tracking branch 'origin' into sls_render_pipe
2012-11-10 23:06:14 -05:00
Pedro Algarvio
d3e0d64068
Show a nice clock counter while we wait for the sync job to finish.
2012-11-09 15:25:16 +00:00
Pedro Algarvio
527cf4ee38
Don't assume again and expand test.
...
* When introducing the "Don't assume!" changes I also assumed that there were always more than one argument from the shell. Expanded the testcase to include this check.
2012-11-09 11:32:36 +00:00
Pedro Algarvio
75f70e49f3
Include a test case for the previous "Don't assume!" commit.
2012-11-09 11:23:30 +00:00
Thomas S Hatch
67f3395627
Merge pull request #2492 from ryanschneider/cp.get_file-gzip
...
Add gzip_compression support to cp.get_file
2012-11-08 17:49:41 -08:00
Ryan Schneider
c638617612
Add gzip_compression support to cp.get_file
2012-11-08 16:09:38 -08:00
Pedro Algarvio
b7c763dec1
Improve salt.utils.build_whitepace_splited_regex()
. Fixes #2379 .
...
* Although we're building a regex which should ignore white space and new lines, the built regex should always match start and end of string.
2012-11-08 19:33:51 +00:00
Jack Kuan
6c13f876b2
Merge branch 'develop', remote-tracking branch 'origin' into sls_render_pipe
2012-11-08 10:31:23 -05:00
Pedro Algarvio
b50e4cb9c5
Improve salt.utils.contains_regex()
. Fixes #2401 .
...
* When `re.search`'ing, do a `re.MULTILINE` search. Not all matches happen on first line, specially using the `BufferedReader`.
* PEP-8 fixes.
* Removed `rowname` from `salt.utils.mysql_to_dict()` since it was not being used.
2012-11-08 12:47:19 +00:00
Jack Kuan
f1c49d6efd
Minor update to a test case.
2012-11-08 02:00:54 -05:00
Jack Kuan
f921e91377
Add unit tests for the stateconf renderer.
...
Also fixed a few bugs in the stateconf renderer.
2012-11-08 01:46:03 -05:00
Thomas S Hatch
ec901ce29c
Merge pull request #2463 from s0undt3ch/issues/2462
...
Fix #2462
2012-11-07 08:12:49 -08:00
Pedro Algarvio
cae00911a5
One more try to properly handle the process termination.
2012-11-07 14:10:02 +00:00
Pedro Algarvio
b4f2ad2884
Never fail on process.terminate()
since the process is supposed to have ended.
2012-11-07 13:58:44 +00:00
Pedro Algarvio
8e9fd09eeb
Try to cleanup after ourselves.
...
* Only instantiate a `LocalClient` on a test if one is required.
* Try to precipitate garbage collection on our minions connect and sync multi-processes.
2012-11-07 13:40:39 +00:00
Ryan Schneider
721bce0a11
Fixed integration test
2012-11-06 19:36:51 -08:00
Ryan Schneider
49fb321254
Add integration test
2012-11-06 19:36:51 -08:00
Pedro Algarvio
c5c637154a
Try to get some system information out of Travis-CI.
2012-11-06 18:11:26 +00:00
Pedro Algarvio
af7ebf12f8
Try not to fail on travis-ci under python 2.6
...
* Raised max open files by 1024 since running in a vagrant machine 2048 was not enough, though, I think travis-ci defaults to a higher value.
* Wait a bit longer on the events testing.
* Separated the initial minions connected and minions synced into two different events and functions. Also corrected the `if` expected value when a timeout occurs.
2012-11-06 16:02:36 +00:00
Pedro Algarvio
e04c872c66
Convert the remaining tests hard-coding temporary paths.
2012-11-06 12:44:53 +00:00
Pedro Algarvio
e2168602fb
Allow passing multiple path elements to construct a path.
2012-11-06 12:15:24 +00:00
Pedro Algarvio
739eeac30d
Create an "alias" for temfile.gettempdir()
to reduce calls to it.
2012-11-06 12:14:02 +00:00
Pedro Algarvio
bb6cb62901
Switched runtests_helpers.get_temp_dir_for_path
to runtests_helpers.get_salt_temp_dir_for_path
.
2012-11-06 11:32:48 +00:00
Pedro Algarvio
75644992e2
Don't hard-code temporary paths on tests. Refs #2462 .
2012-11-06 11:20:06 +00:00
Jack Kuan
f2d8c5cef3
Add yaml/json parsing to values of kwargs for state.single.
...
Also fixed an incorrect use sls_encoder in compile_template_str().
2012-11-06 01:26:08 -05:00
Pedro Algarvio
4d38754f38
Uncomment required line.
2012-11-04 12:22:46 +00:00
Pedro Algarvio
a1696c17d8
Finish fix of last commit.
2012-11-04 11:53:59 +00:00
Pedro Algarvio
33fa855bc4
We're apparently unable to have an empty last line in yaml literal strings.
2012-11-04 11:46:00 +00:00
Pedro Algarvio
5af62d01ac
Fix integration.modules.state.StateModuleTest.test_issue_1896_file_append_source
and still maintaining an empty line check.
2012-11-04 11:35:23 +00:00
Pedro Algarvio
3de32be0c9
Fix integration.shell.call.CallTest.test_default_output()
.
2012-11-04 10:29:07 +00:00
Pedro Algarvio
0cad15e299
Fix integration.runners.jobs
tests.
2012-11-04 10:22:18 +00:00
Pedro Algarvio
2053c03843
Fix key shell tests to match outputter changes.
2012-11-04 10:08:30 +00:00
Pedro Algarvio
6448dd87da
Some fixes on the git state tests.
...
* Always remove the repository directory.
* When testing recursive with git 1.7.9.5, we cannot test for a directory because it's a plain file with the contents:
gitdir: /tmp/salt-tests-tmpdir/salt_repo/.git/modules/vendor/modules/js/receiptverifier
2012-11-04 09:58:05 +00:00
Jeff Schroeder
2bc78460db
Automated cleanup converting str.split('\n') --> str.splitlines()
...
Performed with this command from the top-level source tree:
find -name '*.py' -type f | xargs sed -r -i "s/\.split\('\\\n'\)/.splitlines()/g"
2012-11-03 21:25:11 -07:00
ffa
a12d859642
bug fixes for conformity because cult code is good code
...
* don't overwrite or delete when the force option is not true
* when the user `runas` doesn't have permission to create a directory in the
parent directory of `target` or `name`, the directory may be created in
preparation of git. So, don't remove the empty directory before cloning.
* the force option still removes the directory even if it is empty
* ensure submodules are initiated recursively everywhere for consistency
* catch all module calls for consistency
* tests to test
2012-11-03 00:30:31 -07:00
ffa
019afc0e80
misc bug fixes
2012-10-31 23:13:25 -07:00
ffa
7625ebe429
add integration test to test failure
2012-10-31 22:56:59 -07:00
ffa
79cacbad1e
bug fix and integration tests for git
2012-10-31 22:33:07 -07:00
Thomas S Hatch
7db30d090a
Fix outputter bug introduced with changes to yaml
2012-10-30 14:41:47 -06:00
Thomas S Hatch
c8e79c9ac3
fix outputter test with changes to yaml outputter
2012-10-30 14:15:23 -06:00
Pedro Algarvio
19d07bbba5
Fix tests in integration.shell.call
.
2012-10-30 17:16:06 +00:00
Pedro Algarvio
cfae86b744
Fix salt-key
tests to comply with the new salt.key
changes.
2012-10-30 17:09:50 +00:00
Thomas S Hatch
d8451b9a37
Make wheeltest pprint, much easier to use
2012-10-29 23:04:15 -06:00
Thomas S Hatch
4522d1fb37
W00t, the wheeltest script works
2012-10-29 22:55:22 -06:00
Thomas S Hatch
0ccb4d9b9b
more work on the wheeltest script
2012-10-29 22:22:19 -06:00
Thomas S Hatch
07ad044ab9
Add initial not working next
2012-10-29 18:06:47 -06:00
Thomas S Hatch
1fa5129b90
Fix tests wrt output updates
2012-10-24 22:55:18 -06:00
Antti Andreimann
7085edf590
Use file.managed as a backend of file.recurse. Fixes #1583
...
Rewrite file.recurse state module to leverage existing file.managed and file.directory
modules to do the heavy lifting. This removes code duplication and will make
templates available for file.recurse.
These improvements will be visible to the end-user:
- All files in directory can now be templatized
- destination directory is no longer created in test mode
- When clean mode is enabled, the module is capable of replacing
existing files with directories and vice versa
2012-10-24 17:15:29 -07:00
Thomas S Hatch
9f05f53fd7
Fix tests from failing if token present for the user
2012-10-22 14:43:47 -06:00
Thomas S Hatch
4c8a4b2191
Fix RabbitMQ tests where we can be a little less specific
2012-10-19 15:20:31 -06:00
Scott Walton
e7ea808701
Merge remote-tracking branch 'upstream/develop' into develop
2012-10-19 16:28:55 +01:00
Scott Walton
3b23817559
Fixed tests for supervisor and rabbitmq #962
2012-10-19 16:28:38 +01:00
Scott Walton
9a0fe34e9a
Some clean-up, and tests for #962
2012-10-19 16:07:31 +01:00
Scott Walton
0bd81e5ae6
Added support for managing virtual hosts #962
2012-10-19 15:05:35 +01:00
Scott Walton
b7ed775a07
Grammar
2012-10-19 11:42:32 +01:00
Scott Walton
340616a379
Added test framework for rabbitmq user #962
2012-10-19 11:42:01 +01:00
Thomas S Hatch
8c3fadf15e
Fix python 2.6 compat issue in tests
2012-10-18 22:37:02 -06:00
Daniel Miller
1957700161
Add "file.patch" state function
2012-10-18 12:23:47 -04:00
Daniel Miller
3a68a85a9b
Add "file.patch" module function
2012-10-18 12:20:39 -04:00
Thomas S Hatch
c1fc9d6726
fix sock_dir change for eventlisten script
2012-10-15 22:50:31 -06:00
Seth House
2e9ecdbaa4
Remove bash-ism from pip state test
...
This one is pretty silly; hopefully the regex match is still specific
enough to be a good test.
% bash -c '/tmp/someenv/bin/pip install something'
bash: /tmp/someenv/bin/pip: No such file or directory
% zsh -c '/tmp/someenv/bin/pip install something'
zsh:1: no such file or directory: /tmp/someenv/bin/pip
2012-10-15 15:31:47 -06:00
Pedro Algarvio
6533c48014
Just some renames. Refs #2227 .
2012-10-12 11:53:40 +01:00
Pedro Algarvio
ae7e476bfc
Handle some quoting issues while building the whitespace regex for file.append
. Fixes #2227 .
2012-10-12 11:45:27 +01:00
Pedro Algarvio
d6d8e22b68
Merge branch 'develop' of github.com:saltstack/salt into develop
2012-10-12 10:57:37 +01:00
Seth House
6c103bc4df
Changed lookup_jid runner to return empty dict instead of an exception
2012-10-09 13:55:54 -06:00
Seth House
8c18c29323
Fixed bungled default logic for minionswarm root_dir
2012-10-09 12:20:46 -06:00
Seth House
17627fea89
Added flag to set the root_dir for a minionswarm
2012-10-08 14:16:53 -06:00
Thomas S Hatch
a556a44707
fix jobs runner test for new exception return
2012-10-07 10:20:03 -06:00
Thomas S Hatch
bd041c31f6
sp
2012-10-06 23:39:25 -06:00
Thomas S Hatch
af03feecee
Update jobs runner to check for valid exception type
2012-10-06 23:30:11 -06:00
Thomas S Hatch
fa2c84317d
update to new bad jid return data
2012-10-06 23:01:34 -06:00