Ramón Cahenzli
a30f2ee244
This root or that root? :)
2012-12-11 16:37:30 +01: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
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
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
Pedro Algarvio
bd930cddec
Include a test case for #2731
2012-12-01 23:00:27 +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
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
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
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
Dan Colish
1110f2a1ac
Add test to reproduce #2631
2012-11-20 07:41:38 -08: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
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
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
Pedro Algarvio
c60e4dd645
Fix tests and "convert" text output to "txt" when choosing outputter.
2012-11-16 00:07:08 +00: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
Pedro Algarvio
7c666d21d0
Need at least two worker threads for integration.modules.publish
to pass.
2012-11-13 19:10:17 +00: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
Thomas S Hatch
5d97b51ef2
Merge pull request #2528 from kjkuan/sls_render_pipe
...
Sls render pipe
2012-11-12 09:59:24 -08: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
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
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
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
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
Pedro Algarvio
cec1cbd477
Fix test if there the host has multiple subnets.
2012-10-07 03:05:00 +01:00
Pedro Algarvio
7e816c291f
Add shell ipcadr
match test.
2012-10-06 01:29:24 +01:00
Thomas S Hatch
3d9375038c
Merge pull request #2183 from s0undt3ch/issues/2167
...
Fix #2167 . Testcases included.
2012-10-05 17:21:24 -07:00
Pedro Algarvio
b0bf4919a3
Add exsel
shell match test.
...
Although this commit does not exactly reference the problem see on #2167 , it was added while working for that issue.
2012-10-06 01:11:03 +01:00
Pedro Algarvio
174ee8aab8
Fix #2167 . Testcases included.
2012-10-06 01:05:04 +01:00
Pedro Algarvio
496906e413
Add exsel
shell match test.
...
Although this commit does not exactly reference the problem see on #2167 , it was added while working for that issue.
2012-10-05 07:56:23 +01:00
Pedro Algarvio
eb22aa5f49
Allow some more time to get the tests events notifications.
2012-10-05 07:15:00 +01:00
Pedro Algarvio
ac1fe9810a
Point hosts.file
and aliases.file
to the new tests temporary dir.
2012-10-05 07:10:53 +01:00
Pedro Algarvio
85c6664538
Fix running tests using python setup.py tests
. I was deleting it too soon and not re-creating it. Increase tests verbosity on travis-ci.
2012-10-05 02:45:35 +01:00
Pedro Algarvio
b6cb78364f
Switch integration tmp
to the system's temporary directory.
...
While running the tests within a VirtualBox(vagrant) machine, if the salt source is mounted using shared folders, any tests involving hard links WILL fail. Any tests involving symlinks, can be made to work by setting some properties on the VirtualBox shared folder. By moving the tests `tmp` directory to `tempfile.gettempdir()` we avoid this false test case errors.
2012-10-05 00:52:00 +01:00
Pedro Algarvio
4c456864db
Improve our tests runner.
...
* Show an error when the user tries to use `--xml` and `xmlrunner` is not installed.
* Add support to generate HTML reports of the tests coverage.
2012-10-02 13:04:22 +01:00
Pedro Algarvio
624fb03d9c
Smaller requirements.txt also works for testing.
2012-10-01 10:21:40 +01:00
Pedro Algarvio
e87a408dcd
Correct license.
2012-10-01 10:16:21 +01:00
Pedro Algarvio
8d1411115d
Merge branch 'develop' of github.com:saltstack/salt into issues/1959
2012-09-30 19:21:41 +01:00
Pedro Algarvio
0872852602
Add missing imports.
2012-09-30 18:41:44 +01:00
Pedro Algarvio
27bf64fbf3
Only root can run these tests.
2012-09-30 18:26:39 +01:00
Pedro Algarvio
73a679e070
Include primary group into user.info
groups. Fixes #2137 .
2012-09-30 18:01:47 +01:00
Pedro Algarvio
064b3a60c2
Add test case for #1959 .
2012-09-30 12:20:38 +01:00
Pedro Algarvio
325902c169
Test to make sure we're outputting kwargs on the user.delete documentation.
2012-09-30 10:59:07 +01:00
Pedro Algarvio
420bfe830b
Mark destructive tests with the destructiveTest
decorator.
2012-09-29 23:16:08 +01:00
Thomas S Hatch
f1dca86fd4
Fix some quotes
2012-09-28 17:40:30 -06:00
Thomas S Hatch
59e775ed8d
remove unused skipif
2012-09-28 17:35:59 -06:00
Pedro Algarvio
7f7b196f1e
Include an invalid items test for state.template*
functions. Refs #2068 .
2012-09-28 17:56:13 +01:00
Pedro Algarvio
b28a80fab0
Minor whitespace formatting 'prettyfication'.
2012-09-28 17:44:35 +01:00
Pedro Algarvio
2211afa63a
Properly render the high state loaded from templates. Fixes #2068 .
...
Previously using `state.template` or `state.template_str` would not be checked/rendered into proper formatting resulting in some templates not being correctly executed. For example, the following template worked:
```
/tmp/issue-2068-template-str:
virtualenv:
- managed
- no_site_packages: True
- distribute: True
pep8-pip:
pip:
- installed
- name: pep8
- bin_env: /tmp/issue-2068-template-str
- mirrors: http://testpypi.python.org/pypi
- require:
- virtualenv: /tmp/issue-2068-template-str
```
as opposed to the following which did not work:
```
/tmp/issue-2068-template-str:
virtualenv.managed:
- no_site_packages: True
- distribute: True
pep8-pip:
pip.installed:
- name: pep8
- bin_env: /tmp/issue-2068-template-str
- mirrors: http://testpypi.python.org/pypi
- require:
- virtualenv: /tmp/issue-2068-template-str
```
The dotted names should be converted into lists for example, which was the problems with the two examples above.
2012-09-28 17:34:55 +01:00
Pedro Algarvio
677a08fe7d
Update the test cases which better expose #2068 .
2012-09-28 16:04:38 +01:00
Pedro Algarvio
cc10ed1906
Add include and exclude test cases. Refs #2068 .
2012-09-28 01:17:37 +01:00
Pedro Algarvio
c80ea695b1
Let's narrow any possible errors by reusing the same template contents. Refs #2068 .
2012-09-28 00:22:24 +01:00
Pedro Algarvio
60fe1695a3
Merge branch 'develop' of github.com:saltstack/salt into issues/2068
2012-09-27 23:43:29 +01:00
Scott Walton
ce4237e2bd
Fixed test failures #2026
2012-09-27 20:04:18 +01:00
Scott Walton
768487995d
Merge remote-tracking branch 'upstream/develop' into develop
2012-09-27 19:35:13 +01:00
Pedro Algarvio
fb2b87a675
Merge branch 'develop' of github.com:saltstack/salt into issues/2068
2012-09-27 19:08:13 +01:00
Pedro Algarvio
6e2ba6885e
Fix test case assertion.
2012-09-27 18:43:15 +01:00
Pedro Algarvio
eec932799a
The pip module now uses cmd.run_all
. Fixes #2113 .
...
* In order to check if something went wrong while running the various pip commands using the command module, we need to know, at least, the return code, this way we can report the failure.
* `salt.modules.pip.uninstall()` now returns the `cmd.run_all` `dict` instead of a list of strings. **This breaks previous behaviour**.
* Added a test case for `salt.modules.pip.uninstall()` changes.
2012-09-27 18:33:50 +01:00
Pedro Algarvio
af9709dde5
Properly handle missing pip
binary. Fixes #2087 .
2012-09-27 12:06:09 +01:00
Pedro Algarvio
33aa55f905
Use a PyPI mirror for installing packages. Fixes #2098 .
...
For now we're using `http://testpypi.python.org/pypi ` as the mirror.
2012-09-27 11:55:00 +01:00
Pedro Algarvio
ec2486c9d8
Only test supervisor if conditions are proper. Refs #2026 .
...
* Only the root user can run the supervisor state tests.
* Install supervisor on the travis-ci machine to run the tests.
2012-09-25 22:32:42 +01:00
Pedro Algarvio
6e5fd9e62c
Regular users cannot run the supervisor tests.
2012-09-25 22:19:28 +01:00
Thomas S Hatch
43382b6d1c
Merge pull request #2085 from s0undt3ch/issues/2028
...
Address `pip.installed` regarding weird packages setup. Fixes #2028 .
2012-09-25 10:20:47 -07:00
Pedro Algarvio
41f0f4449e
Address pip.installed
regarding weird packages setup. Fixes #2028 .
...
Some packages, carbon and graphite-web for example, install their packages to a specific root, using a `virtualenv` or not. `pip freeze` won't show those packages as installed.
2012-09-25 12:24:54 +01:00
Scott Walton
438ea792a7
Added state and test for stopping services #2026
2012-09-24 09:45:31 +01:00
Thomas S Hatch
50857861c5
remove unused import
2012-09-24 01:03:24 -06:00
Thomas S Hatch
282c8f4e3c
clean out unused imports
2012-09-24 00:55:01 -06:00
Thomas S Hatch
cf1e87e185
Merge pull request #2031 from scott-w/develop
...
Add Supervisor Support
2012-09-23 22:56:45 -07:00
Scott Walton
48c0d56841
Merge remote-tracking branch 'upstream/develop' into develop
2012-09-23 21:16:09 +01:00
Pedro Algarvio
36fb821596
Add the module.state.template_str()
failing test.
2012-09-23 18:42:26 +01:00
Pedro Algarvio
03c006debb
Removed a test that was using state.template_str
. Re-adding later.
...
The test was removed in order to have a clean pull request. A new issue will be opened because of that failing test.
2012-09-23 18:32:04 +01:00
Pedro Algarvio
c315e95b95
Move the state pip.installed
tests to the proper place.
...
* Moved the state `pip.installed` tests to it's own module, the correct one.
* Added a test which checks for the presence of errors while running `pip.installed` introduced while fixing #2028
2012-09-23 18:16:11 +01:00
Pedro Algarvio
5b9c6f92ce
Issue #2028 fixes and improvements.
...
* `salt.states.pip.installed()` now keeps a reference to the output of the `__salt__['pip.install']()` call. The reason for this is that we need to know and pass along any information about an eventual error when running that call. This is now done in addition to the old behaviour.
* Add some tests which triggered the issue.
2012-09-23 17:25:21 +01:00
Pedro Algarvio
0a9b0b3e08
Merge branch 'develop' of github.com:saltstack/salt into issues/2028
2012-09-20 19:33:00 +01:00
Thomas S Hatch
543f7c6bc9
Fix error cause by django module renaming
2012-09-19 14:52:36 -06:00
Thomas S Hatch
2dc5ebb80e
Fix event test with the change in master events returning a dict
2012-09-19 14:42:48 -06:00
Pedro Algarvio
8ab5e6e9c2
Include some test cases to expose saltstack/salt#2028
2012-09-18 01:53:05 +01:00
Scott Walton
b7f259adc7
Merge remote-tracking branch 'upstream/develop' into develop
2012-09-17 20:36:50 +01:00
Scott Walton
c581e7bab5
Added tests, and modified state/modules to pass #2026
2012-09-17 20:34:50 +01:00
Scott Walton
9e35b77038
Added stop and status
2012-09-15 19:02:00 +01:00
Scott Walton
88c04486e4
Added test and code for start #2026
2012-09-15 18:41:01 +01:00
Pedro Algarvio
ce0c8832a8
Minor PEP-8 changes.
2012-09-07 22:14:38 +01:00
Pedro Algarvio
71327e4ff7
Also allow skipping the tests on the syndic. Refs #1935 .
2012-09-07 20:24:35 +01:00
Pedro Algarvio
5b4d462413
Also skip a run_function test-case in case the minion does not reply. Refs #1935 .
2012-09-07 20:03:44 +01:00
Pedro Algarvio
8c6b96db59
Support -d
on the salt
binary. Fixes #1992 .
2012-09-07 19:21:07 +01:00
Pedro Algarvio
0c830784f3
Merge pull request #1974 from s0undt3ch/issues/1964
...
Reduce requirements to generate keys.
2012-09-05 14:38:03 -07:00
Pedro Algarvio
6e9b2810ee
Reduce requirements to generate keys.
...
The generation of keys does not involve all the checks required to accept/deny/list keys. This code change allows:
* regular users to generate keys
* `/etc/salt` and `/var/log/salt` not to exist or not to be readable by the current user
It also does not check for a running master. We have now lowered the requirements to run this script just for generating keys.
2012-09-05 22:31:12 +01:00
Pedro Algarvio
75f262c447
Fix ValueError
on Py2.6 zero length field names are not supported
2012-09-05 12:11:16 +01:00
Pedro Algarvio
81ccd7c9a7
Remove un-used import.
2012-09-03 23:26:59 +01:00
Pedro Algarvio
e7a10cce98
Fix saltstack/salt#1948
...
* `SaltCPOptionParser` was not reading any configuration file. It should!
* Fixed the `salt-cp` test which was not testing anything, until now.
2012-09-03 23:24:08 +01:00
Pedro Algarvio
5ec829a46e
Fix state tests.
2012-09-03 16:40:52 +01:00
Pedro Algarvio
a45c0bdce8
Fix saltstack/salt#1896
...
* Added `source` support to `salt.states.file.append()`
* Added tests for the above.
2012-09-01 07:49:34 +01:00
Pedro Algarvio
accb15d6ee
Add tests for saltstack/salt#1900
...
* Test both master and minion events firing
* Allow targeting the minions in `tests.integration.ModuleCase.run_function()`
* The above item allows to also test events firing using `tcp` as `ipc_mode` which is being used by the tests `sub_minion`
2012-09-01 07:29:06 +01:00
Pedro Algarvio
71c842a896
Allow skipping random failing tests saltstack/salt#1935
2012-09-01 05:20:53 +01:00
Thomas S Hatch
34829cd046
Clean up unused imports and variables
2012-08-30 14:14:02 -06:00
Thomas S Hatch
47bd829764
Merge pull request #1895 from s0undt3ch/issues/1864
...
Fix #1864 - Support `makedirs` to `salt.states.file.append()`
2012-08-28 12:40:39 -07:00
Pedro Algarvio
b3a03e391f
Fix #1864 - Support makedirs
to salt.states.file.append()
2012-08-28 12:05:50 +01:00
Pedro Algarvio
8b645b339b
Fix #1879 . Searching/matching is now done on multiple lines.
...
* `salt.modules.file.contains()`, `salt.modules.file.contains_regex()`, `salt.modules.file.contains_glob()` and `salt.utils.find` now do the searching/matching against chunks of data; using defaults, 32KB chunks of data in files; instead of searching/matching line by line.
* Based on the above changes `salt.states.file.append()`, when checking if the text to append is already present, now uses `salt.modules.file.contains_regex()` in order to match spanning multiple lines ignoring the addition/deletion of white-space or new lines, except inside commas.
* The regex used on the above item is built at runtime using `salt.utils.build_whitepace_splited_regex()`, just feed the text to it and you'll get back the proper regex to the matching/searching on, for example `salt.modules.file.contains_regex()`.
* Added tests for all this code.
2012-08-28 10:03:11 +01:00
Pedro Algarvio
797defc320
Add the failing test for saltstack/salt#1879
2012-08-26 00:38:39 +01:00
Pedro Algarvio
22d69e43c7
Properly catch some more state SLS syntax errors.
...
Sort keys before checking for same key in rule. Fixes #1876 .
2012-08-25 14:44:07 +01:00
Pedro Algarvio
d21e8c7b27
Another mkdir
that should be included in previous commit.
2012-08-25 14:36:30 +01:00
Pedro Algarvio
6b2e12d9bf
Don't fail on tests because we're trying to create a directory and it exists(and that's not the actual test).
2012-08-25 14:21:38 +01:00
Pedro Algarvio
5da4fcb109
Fix integration.runners.manage
tests.
...
These tests started to fail after 54cf9ca
and specially 5626332
.
2012-08-25 14:21:08 +01:00
Thomas S Hatch
f25167802a
fix test that broke because of output changes
2012-08-18 01:48:40 -06:00
Ulrich Dangel
7176ec5d4a
Add test to test if os_family grain is provided.
...
Corey Quinn reported a issue where __grains__['os_family'] returned a
KeyError. This commits adds a check to the grains module test to ensure
os_family is present.
2012-08-15 02:59:03 +02:00
Pedro Algarvio
e32faa4a28
Fix salt-call
bug with default outputter.
...
* `salt-call` default outputter returned from `salt.output.get_printout()` was `None` and `None` isn't callable neither outputs anything useful. In this case, the fault Outputter should be used.
* `get_printout()` also tested for `txt_out` which now is, in the cleaned up parsers, `text_out`. Fixed.
2012-08-13 07:10:42 +01:00
Pedro Algarvio
2faada54d3
Fix the too many open file descriptor issues on 2.6 while running tests.
2012-08-08 09:04:52 +01:00
Pedro Algarvio
2bf0187ae5
Don't close stderr
if it's not being used.
2012-08-08 08:18:45 +01:00
Pedro Algarvio
bbfa0b939b
One more try travis.
2012-08-08 01:35:36 +01:00
Pedro Algarvio
12007c23a3
Let's see if travis stops failing on 2.6 with "filedescriptor out of range in select()"
2012-08-08 01:21:16 +01:00
Pedro Algarvio
759d67ffc0
Reverted back the --key-logfile
deprecation.
...
On the parsers cleanup branch, I though about making the available options as equal as possible. Since the log_file setting for the master and the minion could be separately set, I made the logfile option for the key also log_file. Yet, since there's no key specific config file, it shares master, one could only specify the log_file settings from the cli, it could not be hardcoded on the config file, unless, we made a separate config file just for key.
So, in order to reduce required changes, and keep it all as backwards compatible as possible, the key log file options is now, once again, `--key-logfile` which will allow us to hardcode it in the masters config file as `key_logfile`.
This will also, hopefully make travis behave better too.
2012-08-08 01:08:38 +01:00
Pedro Algarvio
0b73795310
Merge branch 'develop' of git://github.com/saltstack/salt into develop
2012-08-06 23:05:37 +01:00
Pedro Algarvio
2a7e9500d7
Set the master's logfile to avoid travis failing.
2012-08-06 17:58:30 +01:00
Thomas S Hatch
2355dc3dd4
Merge pull request #1770 from s0undt3ch/master
...
Make file.touch work on directories and fix some tests when using `--no-clean`
2012-08-06 01:03:49 -07:00
Pedro Algarvio
c89928ec33
Typo.
2012-08-05 19:31:13 +01:00
Pedro Algarvio
a4b96eacfc
Corrected last commit line placement.
2012-08-05 19:29:56 +01:00
Pedro Algarvio
dcc0efcd70
Re-add wrongly removed line.
2012-08-05 19:27:28 +01:00
Pedro Algarvio
d01b8da9aa
Fix some tests when using --no-clean
...
When using `--no-clean` while running tests, some files/dirs still need to be removed, if not, test will fail. This commit tries to addresses those issues.
2012-08-05 19:23:12 +01:00
Pedro Algarvio
ac1ee79fa6
Cleanup the salt-run
(salt.cli.SaltRun
) binary parser.
...
Reused the timeout mix-in. All cli tools parsers also reuse the config mixin.
This commit finishes cleaning up the cli tool parsers.
2012-08-04 23:25:37 +01:00
Pedro Algarvio
261450e90f
Cleanup the salt-call
(salt.cli.SaltCall
) binary parser.
...
Reused the logging and output mix-ins.
2012-08-04 23:07:39 +01:00
Pedro Algarvio
060f33a15a
Cleanup the salt-key
(salt.cli.SaltKey
) binary parser.
...
Reused the output options and logging setup mix-ins.
Fixed a bug introduced in previous commit on `salt.utils.parsers.SaltCPOptionParser._mixin_after_parsed()`, function does not accept any arguments.
2012-08-04 22:55:15 +01:00
Pedro Algarvio
f5aad4f8e2
Cleanup the salt-cp
(salt.cli.SaltCP
) binary parser.
...
For this, the timeout mix-in and both the target and output parser group mix-ins were re-used. Way less code and logic to keep track of.
Added a simple test for this binary too.
2012-08-04 22:28:51 +01:00
Pedro Algarvio
b582e40ff1
Cleanup the salt
(salt.cli.SaltCMD
) binary parser.
...
* Created 2 mix-ins as option groups, the output options and the target options. This will allow adding some explanatory text besides separating these options from the parser's main options.
* All options on the parser, including the grouped options are now merged to the loaded configuration which will latter get passed on.
* Also created the timeout mix-in which will be used in other binaries.
2012-08-04 22:08:06 +01:00
Pedro Algarvio
d776705e49
Parsers(master, minion, syndic) cleanup code.
...
Moved the minion, master and syndic parsers to use mixins to clean up, reuse, and automate some of the required procedures.
2012-08-04 19:58:32 +01:00
Pedro Algarvio
6d3028f3da
Removed the pip module integration tests since it's also being tested in the virtualenv's integration tests.
2012-08-01 23:11:48 +01:00
Pedro Algarvio
e57f505a2d
Fix pip.freeze
tests which require an active virtualenv.
2012-08-01 22:40:15 +01:00
Pedro Algarvio
97a4c1dde2
Fix integration/modules/file.py
...
Since the tests are comparing results, switch to `assertEqual`'s.
2012-08-01 19:36:49 +01:00
Pedro Algarvio
7148735b12
Fix virtualenv integration tests.
...
The virtualenv module needs to have a default for `venv_bin`.
2012-08-01 18:57:31 +01:00
cheater
d07d6b8a7b
Adding the gid_from_name parameter to the user.present state
2012-07-30 21:15:35 +02:00
Roman Imankulov
aa5896681d
Fix the escaping issue in cmd.run
...
Lack of escaping in cmd.run with "runas" option could lead to incorrect
execution of commands containing quotes in their bodies.
2012-07-26 22:21:07 +06:00
Roman Imankulov
bc1650a085
Add "mockbin" directory and a fake "su" wrapper for tests
...
While performing integration tests, the "mockbin" directory is
inserted in the beginning of the $PATH environment variable.
This effectively means that every file placed in this directory will be
executed instead of real one from the system, which opens up the
opportunity to write more complex integration tests.
At the time the only wrapper for "su" command (used in "cmdmod") is
placed there.
2012-07-26 22:14:00 +06:00
Thomas S Hatch
366a4935c1
single quotes
2012-07-23 13:29:55 -06:00
Thomas S Hatch
e61ddfdcfc
fix many a test
2012-07-23 13:00:54 -06:00
Intchanter
768e17b9d5
We return tuples, not lists
2012-07-20 08:31:36 -06:00
Roman Imankulov
bb0ed1a3a7
Tests cleanup
...
Defined "integration.run_tests()" function which can be used to execute
a particular integration test case. Existing bolerplate code in modules
and states tests is replaced with following lines:
if __name__ == '__main__':
from integration import run_tests
run_tests(TestCaseName)
Typical usecase could look like this:
python integration/modules/pip.py --no-clean -vv
2012-07-20 12:25:08 +06:00
Roman Imankulov
4cac03c42d
Add options --clean and --no-clean in runtest.py
...
--no-clean option speeds up repeating test execution by skipping the cleanup
process before and after testing.
Typical use case command could look like
./runtests.py -vv --no-clean --name integration.modules.ssh
2012-07-20 12:16:14 +06:00
Intchanter
df4a83ac61
Made data.getvals work with CLI, updated test
2012-07-19 21:35:23 -06:00
Jeroen Dekkers
a28272e2fb
Fix "undefined name" errors spotted by pyflakes
2012-07-15 03:01:35 +02:00
Intchanter
f663dd2c46
Merge branch 'develop' of https://github.com/saltstack/salt into develop
...
Conflicts:
salt/states/network.py
setup.py
tests/integration/__init__.py
2012-07-08 22:50:12 -06:00
Thomas S Hatch
e446a306c7
Add sock_dir verification to tests
2012-07-07 22:11:36 -06:00
Thomas S Hatch
7f034cf6ba
See if pushing the timeout to insane levels makes travis stop failing
2012-07-05 20:17:04 -06:00
Intchanter
3c05a3ee78
Merge branch 'develop' of https://github.com/saltstack/salt into develop
...
Conflicts:
tests/integration/modules/grains.py
tests/integration/states/host.py
tests/unit/utils/find_test.py
2012-07-04 18:29:13 -06:00
Alec Koumjian
a22773bdde
Instruct authors of state modules to check for the test parameter
2012-07-03 14:17:52 -07:00
Alec Koumjian
bdb4055ce2
Updating Virtualenv module test with cross-platform file.remove
2012-07-03 08:39:11 -07:00
Dan Colish
b43c256ea7
Adds file.remove to file module, #1545 . Drive by spelling correction
2012-07-03 07:50:02 -07:00
Dan Colish
aacd9cc5bd
Use getpass.getuser since os.getlogin requires a tty and tests do not
...
always run with one.
2012-06-30 23:31:01 -07:00
Dan Colish
abf50324d2
Fix integration.module.file tests on linux
2012-06-30 22:47:02 -07:00
Thomas S Hatch
6ac1e176e5
Merge pull request #1548 from laprice/6a63f7c71c39fe442780c192b566e5bcd7f94f42
...
user creation tests work properly for issue #1482
2012-06-30 17:45:31 -07:00
Dan Colish
71e97d6921
Fix file.chown to report unknown users and groups. Add tests to prove it.
2012-06-30 17:33:34 -07:00
Larry Price
6a63f7c71c
Destructive tests now fail properly.
2012-06-30 17:28:48 -07:00
Larry Price
0d1d01fba2
Adding the user creation tests.
...
These tests will create users on the test machine if you run them as root.
2012-06-30 17:00:27 -07:00
Dan Colish
087f8be69a
Merge branch 'develop' of git://github.com/saltstack/salt into develop
2012-06-30 16:56:31 -07:00
Dan Colish
f91d947806
Simplify file.chgrp. Add file module test suite
2012-06-30 16:56:02 -07:00
Larry Price
6408f286b2
added two tests that will only be run if you are root.
2012-06-30 16:51:11 -07:00
Jeff Schroeder
4b13aebe0b
Merge pull request #1542 from akoumjian/develop
...
Initial module tests for virtualenv
2012-06-30 16:46:44 -07:00
Alec Koumjian
378606c97f
Initial module tests for virtualenv
2012-06-30 16:43:32 -07:00
Dan Colish
e767d25a5e
Use tempdir to ensure there will always be a directory which can be accessed.
2012-06-30 15:48:28 -07:00
Alec Koumjian
40781ea0ae
Fix for minion KeyError 1523
2012-06-30 14:25:14 -07:00
Intchanter
a1433ef5ec
PEP8 fixes for tests
2012-06-30 14:10:34 -06:00
Larry Price
77f54af75e
Merge branch 'develop' of https://github.com/saltstack/salt into develop
2012-06-30 11:43:49 -07:00
Jeff Schroeder
5e85497760
Gracefully skip the django module tests w/o mock
2012-06-30 14:53:55 -07:00
Thomas S Hatch
8ba1d51a75
Merge pull request #1533 from mattrobenolt/django-module-tests
...
Added tests for Django module
2012-06-30 14:33:16 -07:00
Thomas S Hatch
ede600a734
Merge pull request #1532 from akoumjian/develop
...
Fix for minion KeyError 1523
2012-06-30 14:27:40 -07:00
Matt Robenolt
d327e6bdf4
Adding tests for Django module commands
2012-06-30 14:24:22 -07:00
Dan Colish
c5cdb366dc
Fix test.integration.states.host. Make master_config and minion_config a property to keep semantics consistent
2012-06-30 13:54:23 -07:00
Thomas S Hatch
65d8cb4e59
Merge pull request #1521 from dcolish/develop
...
Fix host file setup and fix tests.integration.states.host
2012-06-30 12:00:05 -07:00
Dan Colish
f79b6e5ea0
Fix host file setup and fix tests.integration.states.host
2012-06-30 11:47:48 -07:00
Matt Robenolt
57ff2bfe3e
Hardcode /tmp/subsalttest dir in ssh module integration tests
...
I don't really like doing this, but `/tmp/subsalttest dir` is already
hardcoded in other places for running tests.
Without this, when running tests under a mounted Vagrant drive,
`ssh-keygen` doesn't have permission to create the symlink for
known_hosts to known_hosts.old, causing a test to fail.
```
======================================================================
FAIL: test_rm_known_host (integration.modules.ssh.SSHModuleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/vagrant/tests/integration/modules/ssh.py", line 143, in
test_rm_known_host
self.assertEqual(ret, 'add')
AssertionError: 'exists' != 'add'
```
`link /vagrant/tests/integration/tmp/known_hosts to
/vagrant/tests/integration/tmp/known_hosts.old: Operation not permitted`
2012-06-30 11:46:31 -07:00
Larry Price
994d62431e
found the issue, set cwd.
2012-06-30 11:43:32 -07:00
Larry Price
aa95c9d26b
initial test case for user.
2012-06-30 09:43:44 -07:00
Dan Colish
edfb3d2560
Merge branch 'develop' of git://github.com/saltstack/salt into develop
...
Conflicts:
tests/unit/utils/find_test.py
2012-06-30 12:46:04 -07:00
Dan Colish
78d16a28f0
Move tmp hosts file management to test case which requires it. Fix
...
test.unit.utils.find_test on OSX
2012-06-30 12:20:53 -07:00
Baiju Muthukadan
f9e9e32eaf
The pwd & grp modules are only available for unix
2012-06-23 11:47:53 +02:00
Thomas S Hatch
7477583c97
Add test for recuse error
2012-06-19 10:29:14 -06:00
Jeroen Dekkers
ac2344f2cb
Skip pip test if pip is not installed
2012-06-19 03:11:54 +02:00
Jeroen Dekkers
9dd57c057e
Use cat instead of echo for cmd.which test, as echo can be a built-in
2012-06-19 02:17:55 +02:00
Thomas S Hatch
baa9cf88eb
Add sls for non recurse test
2012-06-15 22:41:59 -06:00
Thomas S Hatch
b13f723ed6
Add non recurse test
2012-06-15 22:41:36 -06:00
Thomas S Hatch
8de4dbc13d
disable failing aliases tests
2012-06-05 18:11:15 -06:00
Thomas S Hatch
ef6b027e90
Fix salt key tests for new no_color option
2012-06-05 18:10:59 -06:00
Thomas S Hatch
5b05d77405
Add sock_dir setting for the integration test syndic
2012-06-05 17:51:52 -06:00
Thomas S Hatch
f3c7b5be5f
Fix path loading for shell tests
2012-06-05 17:04:28 -06:00
Thomas S Hatch
5c6b8aea28
docstring cleanups for ssh tests
2012-06-04 17:22:43 -06:00
L.C. Rees
cc8a921311
- more py3k fixes
2012-06-04 16:40:34 -06:00
Thomas S Hatch
400a429502
Add user to integration verify_env
2012-06-02 23:17:52 -06:00
L.C. Rees
cdb5e89631
- exploit how 'iterkeys' is default iterator for dict
...
- use values()
- pep8
2012-06-01 13:06:43 -06:00
Baiju Muthukadan
91ce3a7ec9
cleanup temp directories created by tests
2012-05-31 16:13:03 +05:30
L.C. Rees
924d8b450b
- fix cmd tests so they pass on MacOS X
2012-05-30 15:57:53 -06:00
Baiju Muthukadan
5f0de59ab7
Test runner boiler plate; remove unused imports
2012-05-31 03:11:25 +05:30
Dan Colish
49972a1580
The text outputter will insert newlines, the tests must expect these
...
to be present.
2012-05-29 21:45:51 -07:00
Dan Colish
f5c8e242e4
Refactor runtests to allow dotted path module discovery.
...
In addition to traditional file system path test discovery it is
useful to run a test by stating it's dotted python path. For example,
this will only run the cmdmod integration tests from the
module suite::
$ runtests.py -n tests.integration.modules.cmdmod
2012-05-29 19:56:47 -07:00
Baiju Muthukadan
24bb4ea4e0
Fix PEP8 warnings for test cases
2012-05-29 22:10:20 +05:30
Thomas S Hatch
7247c5afe7
Fix test error due to fix in static calls
2012-05-27 21:43:35 -06:00
Thomas S Hatch
0020706067
Add jobs jobs.list_jobs runner test
2012-05-27 21:34:48 -06:00
Thomas S Hatch
e5b5d458c3
Add tests for jobs runner
2012-05-27 21:24:45 -06:00
Thomas S Hatch
a19ffae25f
Add tests for the manage runner
2012-05-27 21:02:29 -06:00
Thomas S Hatch
aed4f593e0
Add runner test interface
2012-05-27 21:00:10 -06:00
Thomas S Hatch
d8ca98f3a4
Add test to make sure #1348 does not happen again
2012-05-27 17:41:49 -06:00
Jon McKenzie
c0f8e07bd7
Add --yaml-out, --json-out, and --raw-out outputters to salt-key CLI (retain color output as default)
2012-05-26 18:22:24 -04:00
Roman Imankulov
28ca4cb776
Fix file.comment/file.uncomment states
...
Function "file.contains_regex" used to search values from the beginning
of the line and thus couldn't find pattern "hello world" in a "#hello
world" string.
2012-05-25 12:38:57 +06:00
Roman Imankulov
c9a20edee0
Fix ssh_known_hosts state return values
2012-05-24 22:05:45 +06:00
Roman Imankulov
d45bc9179a
Set ssh.set_known_host bug
2012-05-23 23:45:16 +06:00
Thomas S Hatch
8bfab4e7c0
pillar matcher test
2012-05-23 10:18:54 -06:00
Thomas S Hatch
f7e2af08cf
Add pillar data specific to the sub_minion
2012-05-23 10:05:14 -06:00
Thomas S Hatch
757e8591dd
Add test for compound matcher
2012-05-23 09:57:33 -06:00
Thomas S Hatch
b25e82c59f
Add regex grain match tests
2012-05-23 09:39:10 -06:00
Thomas S Hatch
b5bdfc3073
Add grain matcher test
2012-05-23 08:46:12 -06:00
Thomas S Hatch
19baf0f577
Add initial matcher tests
2012-05-23 08:31:58 -06:00
Thomas S Hatch
5c09aa3778
Fix docstrings in shellCase
2012-05-23 08:14:16 -06:00
Thomas S Hatch
b1c710e70a
fix error with new minion in salt-key tests
2012-05-23 08:08:35 -06:00
Thomas S Hatch
dd6e2da941
Fix salt-key test for new minion
2012-05-23 08:05:47 -06:00
Thomas S Hatch
c9cddd2245
Add second minion to tests
2012-05-23 08:04:38 -06:00
Roman Imankulov
f20cb3b92c
Add support for test mode operations
2012-05-23 00:13:52 +06:00
Roman Imankulov
41465d5f0a
Add support for ssh_known_hosts states
2012-05-21 23:45:03 +06:00
Roman Imankulov
1590483fe2
Add support for known_hosts management
...
Module "ssh" is now capable of keeping track of records in ssh
known_hosts file, as well as asking remote hosts for their public keys.
2012-05-21 21:49:43 +06:00
Roman Imankulov
9d193b85b7
Add support for ssh public keys fingerprint
...
- function _validate_keys returns public key fingerprint as described in
RFC 4716
- one more test to validate how "ssh.auth_keys" function works
2012-05-20 23:09:52 +06:00
Thomas S Hatch
a4864f9c80
Add initial compiler tests
2012-05-16 23:00:01 -06:00
Thomas S Hatch
fdf155bbe2
Add interface for testing bad sls data
2012-05-16 22:58:18 -06:00
Thomas S Hatch
76efdd9fb0
Fix bug in tests with aliases
2012-05-16 22:49:19 -06:00
Thomas S Hatch
5f9a7e87e4
Initial host state test
2012-05-14 23:56:45 -06:00
Thomas S Hatch
26bcb2a4cf
Add state_result method to ModuleCase
...
This makes getting the result field out of the return from run_state
easier
2012-05-14 23:43:16 -06:00
Thomas S Hatch
3abc36b4d2
Add tests for cmd state
2012-05-14 11:18:36 -06:00
Thomas S Hatch
8e26ea646e
Add rm_alias test
2012-05-14 10:44:17 -06:00
Thomas S Hatch
3c92ebc465
aliases.list_aliases test
2012-05-14 09:59:38 -06:00
Thomas S Hatch
800cf2825c
Add test for aliases.has_target
2012-05-14 00:04:26 -06:00
Thomas S Hatch
b97ec99999
Add initial aliases tests
2012-05-13 23:51:22 -06:00
Thomas S Hatch
c5df9f6526
Add config for aliases tests
2012-05-13 23:51:00 -06:00
Thomas S Hatch
04652619d8
Fix #1268 , this adds the working test for recursive requisite errors
2012-05-13 23:16:45 -06:00
Thomas S Hatch
eead7e0dab
Add test for recursive sls data checks
2012-05-13 21:31:46 -06:00
Baiju Muthukadan
fa3b39f071
remove trailing whitespaces
2012-05-13 19:48:05 +05:30
Thomas S Hatch
6897542aa2
test the test interface for file.touch state
2012-05-13 02:07:54 -06:00
Thomas S Hatch
e363cf0105
test for file.touch
2012-05-13 02:06:46 -06:00
Thomas S Hatch
ac451b7498
test interface test for file.append
2012-05-13 02:02:20 -06:00
Thomas S Hatch
cc6175444c
Add file.append test
2012-05-13 02:00:01 -06:00
Thomas S Hatch
23e4e82abf
Add file.uncomment tests
2012-05-13 01:54:20 -06:00
Thomas S Hatch
e798e80891
test interface test for file.comment
2012-05-13 01:38:31 -06:00
Thomas S Hatch
b2dd62864a
Add test for file.comment
2012-05-13 01:35:01 -06:00
Thomas S Hatch
58d56930c3
test interface for file.sed
2012-05-13 01:24:26 -06:00
Thomas S Hatch
dd25243cea
test for file.sed
2012-05-13 01:20:28 -06:00
Thomas S Hatch
a85c66cc3e
test for file.recurse interface
2012-05-13 01:02:05 -06:00
Thomas S Hatch
1a875571ba
Test for file.recurse state
2012-05-13 00:54:28 -06:00
Thomas S Hatch
2ebd8a9827
Add test for file.directoty test interface
2012-05-13 00:27:00 -06:00
Thomas S Hatch
4c2200d351
tests for file.directory
2012-05-12 23:38:24 -06:00
Thomas S Hatch
75409f6b0c
Add test interface test for file.managed
2012-05-12 23:27:00 -06:00
Thomas S Hatch
b811d8b5ba
Add test for file.managed
2012-05-12 23:19:39 -06:00
Thomas S Hatch
a6c748dad7
verify file.absent test interface
2012-05-12 22:58:26 -06:00
Thomas S Hatch
5a94a41305
file.absent tests
2012-05-12 22:55:28 -06:00
Thomas S Hatch
ccdde36173
verify the test interface for file.symlink
2012-05-12 22:41:47 -06:00
Thomas S Hatch
2ae38748d4
add check when cleaning integration temp files
2012-05-12 22:36:46 -06:00
Thomas S Hatch
9628f9a90b
Add state integration test for file.symlink
2012-05-12 22:31:58 -06:00
Thomas S Hatch
97966f521a
Add state functions to integration tests
2012-05-12 22:27:30 -06:00
Thomas S Hatch
7f574abba1
Add run_state function to ModuleCase
2012-05-12 20:40:28 -06:00
Jeff Schroeder
23a59c71d1
Cleaning up the publish module integration tests a bit
2012-05-09 21:42:38 -07:00
Jeff Schroeder
a561e224f2
DRY with the grains integration tests
2012-05-09 21:39:49 -07:00
Jeff Schroeder
81fbdc1249
Properly use os.path.join in some integration tests
2012-05-09 21:36:20 -07:00
Baiju Muthukadan
cb5e3ea089
Add testrunner boilerplate code to run tests
2012-05-05 19:39:23 +05:30
Marc Abramowitz
607eab025a
Fix pip.freeze and add a test for it.
2012-05-02 19:07:21 -07:00
Thomas S Hatch
daa47eab29
make cmd tests use always available shells
2012-04-27 16:13:33 -06:00
Thomas S Hatch
e84d4e1101
Add soem comments to the runner tests
2012-04-21 18:11:24 -06:00
Thomas S Hatch
242d554441
Add initial tests for the salt-run command
2012-04-21 18:04:50 -06:00
Thomas S Hatch
5d75091788
Add run_salt and run_run to ShellCase
2012-04-21 17:52:29 -06:00
Thomas S Hatch
8276c2548b
Change name of clicase to shellcase
2012-04-21 17:51:41 -06:00
Thomas S Hatch
7530f39269
Add some more key tests
2012-04-21 17:47:04 -06:00
Thomas S Hatch
98027c3fb6
Add initial salt-key test
2012-04-21 17:31:46 -06:00
Thomas S Hatch
e301fee420
Add shell tests and shellCase to test structure
2012-04-21 17:27:59 -06:00
Thomas S Hatch
4f3fbe0991
remove unused import
2012-04-21 17:02:18 -06:00
Thomas S Hatch
788eeaa313
Initial addition of CLITest interface
2012-04-21 16:58:03 -06:00
Evan Borgstrom
a17dff3a02
When add_host re-ordered hosts it would leave out trailing new lines
...
This caused problems when adding another host and you'd end up with
entries such as:
```
192.168.1.2\t\thost2\thost2alias192.168.1.1\t\thost1\thost1alias
```
Test updated to reflect.
2012-04-12 23:50:00 -04:00
Thomas S Hatch
f95c8a74e4
Add test for ext_pillar
2012-04-08 21:34:55 -06:00
Thomas S Hatch
24a9d3cea1
Add backend for initial ext_pillar tests
2012-04-08 21:31:08 -06:00
Thomas S Hatch
41a81f85d2
Merge pull request #1063 from fatbox/hosts-duplicate-entries
...
Ensure hosts.add_host isn't leaving duplicate entries around
2012-04-08 15:18:40 -07:00
Evan Borgstrom
2d66c50d74
Ensure hosts.add_host isn't leaving duplicate entries around
...
Given a state entry like the following:
```
host-staging-web:
host:
- present
- ip: 10.102.130.100
- names:
- staging-web.fqdn.com
- staging-web
- alt-staging-hostname
```
You'd end up with three different entries in your hosts file:
```
10.102.130.100 staging-web.fqdn.com
10.102.130.100 staging-web.fqdn.com staging-web
10.102.130.100 staging-web.fqdn.com staging-web alt-staging-hostname
```
This corrects it by removing the previous line before appending the
newly crafted on, and adds tests to prove it.
2012-04-08 14:33:30 -04:00
Thomas S Hatch
b8227350dc
finish cp module tests with cp.hash_file
2012-04-04 12:00:52 -06:00
Thomas S Hatch
2178b0162b
Add cp.is_cached test
2012-04-04 10:46:01 -06:00
Thomas S Hatch
0402ca6194
Add cp.list_minion test
2012-04-04 10:39:45 -06:00
Thomas S Hatch
9f4b4632db
Add cp.list_states test
2012-04-04 10:28:57 -06:00
Thomas S Hatch
0d2519dd31
Add test for cp.cache_local_file
2012-04-04 10:25:02 -06:00
Thomas S Hatch
55e9f01f91
Add cp.cache_master test
2012-04-04 10:13:29 -06:00
Thomas S Hatch
32bf556642
Add test for cp.cache_files
2012-04-04 00:06:41 -06:00
Thomas S Hatch
eef4741c6c
Add cache_file test
2012-04-03 23:58:34 -06:00
Thomas S Hatch
f61c821520
Add cp.get_url test
2012-04-03 23:52:56 -06:00
Thomas S Hatch
222fe3cc8f
Add cp.get_dir
2012-04-03 23:46:45 -06:00
Thomas S Hatch
18e1d5db6e
Add cp.get_template tests
2012-04-03 23:31:53 -06:00
Thomas S Hatch
f1b4e4bda6
Add inital cp module tests
2012-04-03 23:15:37 -06:00
Thomas S Hatch
ae82e606b4
Add files for testing the cp module
2012-04-03 23:14:47 -06:00
Thomas S Hatch
4fe889434f
Add cleaning to the integration module
2012-04-03 23:14:26 -06:00
Thomas S Hatch
42ee187943
Add client kwarg tests
2012-04-03 22:30:38 -06:00
Thomas S Hatch
ea7e9d2ff5
move syndic to client tests
2012-04-03 21:59:38 -06:00
Thomas S Hatch
e43f213b8f
Add first client api tests
2012-04-03 21:57:41 -06:00
Thomas S Hatch
a00d3cb501
Add tests to cover pillar passing minion grains data in
2012-04-01 21:59:23 -06:00
Thomas S Hatch
62b2166ab4
Add test to verify the kwarg passing from the publish module
2012-04-01 13:29:23 -06:00
Thomas S Hatch
a919def70b
don't need to test the syndic coverage like this, save some time
2012-04-01 13:10:37 -06:00
Thomas S Hatch
d00133e343
Add some tests for states
2012-03-29 17:18:32 -06:00
Thomas S Hatch
24bc642508
Add files to file_roots for tests
2012-03-29 16:53:48 -06:00
Thomas S Hatch
2d81528eaa
Add file_roots config to tests
2012-03-29 16:51:56 -06:00
Thomas S Hatch
47768c7149
Add pillar module verification
2012-03-29 16:35:49 -06:00
Thomas S Hatch
6dadf88000
Add pillar data to tests
2012-03-29 16:19:19 -06:00
Thomas S Hatch
d1dee6d4e3
remove old master process fix
2012-03-29 15:41:32 -06:00
Thomas S Hatch
d643db9154
remove misconfigured file_roots lines
2012-03-29 09:37:11 -06:00
Thomas S Hatch
53befac5e8
Add a syndic, syndic master and finish synndic tests
2012-03-29 01:03:37 -06:00
Thomas S Hatch
cda5dfbf4d
update configs for syndic tests
2012-03-29 01:03:11 -06:00
Thomas S Hatch
fac809f11a
add initial files for syndic tests
2012-03-29 01:02:40 -06:00
Thomas S Hatch
9d0f49e2bf
Add a SyndicCase for testing syndic functions
2012-03-28 22:25:59 -06:00
Thomas S Hatch
f06ea9335d
Update tests to run an extra master and a syndic
2012-03-28 22:14:31 -06:00
Thomas S Hatch
1e63ffc862
Add syndic master config for the test environment
2012-03-28 22:13:34 -06:00
Thomas S Hatch
7221d566e5
Add auth test for minion publish
2012-03-28 18:47:10 -06:00
Thomas S Hatch
62b709d578
publish tests
2012-03-28 18:37:05 -06:00
Thomas S Hatch
ecfb4b1df0
update config for publish tests
2012-03-28 18:36:38 -06:00
Thomas S Hatch
5b3b5bb145
Add sys module tests
2012-03-28 12:07:48 -06:00
Thomas S Hatch
7d005f9b50
clean up files before running tests
2012-03-28 00:10:13 -06:00
Thomas S Hatch
118c02886a
Add tests for the data module
2012-03-27 23:45:49 -06:00
Thomas S Hatch
8cf2a16ff9
Add tests for the cmd module
2012-03-27 17:05:38 -06:00
Thomas S Hatch
5cbc724ba5
Add disk tests
2012-03-26 23:13:36 -06:00
Thomas S Hatch
8714418920
Wrap chack in try/except block
2012-03-26 15:02:48 -06:00
Dan Colish
7512c7fb47
Test the corresponding cmd function
2012-03-10 07:27:38 -08:00
Dan Colish
6f5b6a63f7
Fix integration tests on osx
2012-03-08 23:47:34 -08:00
Dan Colish
56a835a5c6
Move utility functions into utils
2012-03-08 20:26:11 -08:00
Eivind Uggedal
35ea9ed02d
Kill all child processes of the test master daemon after each test run.
2012-02-20 13:22:02 +01:00
Eivind Uggedal
ab7ace6aa5
Split out integration tests from pure unit tests.
...
Integration tests requiring a salt master and daemon were seperated
from pure unit tests. For now both are run with runtest.py. In
the future it could take arguments for which type of tests to run.
2012-02-20 13:18:13 +01:00