Pedro Algarvio
596b38e494
Provide env
to templates.
...
Map `env` to the same value of `saltenv` in the templating context until
`env` is fully deprecated in favor of `saltenv`.
Fixes #11480 .
2014-03-29 13:03:36 +00:00
Thomas S Hatch
43de620730
Merge pull request #11413 from s0undt3ch/hotfix/immutable-lists-sum
...
Simpler immutable types
2014-03-21 11:40:09 -06:00
C. R. Oldham
6c60f17751
Add two tests for checking file permissions when file is already existing
2014-03-17 14:25:17 -06:00
Erik Johnson
37bf8ee768
Change package used for opensuse integration pkg tests
2014-03-14 11:50:32 -05:00
Colton Myers
ea800935d7
Switch git clones to saltstack/salt-test-repo (super small repo)
...
Was previously cloning bootstrap a few times, and our salt repo once
(which is a large repo). Should speed up the git tests substantially.
2014-03-14 09:45:17 -06:00
Pedro Algarvio
2f3d7bd6cc
Merge branch 'develop' of github.com:saltstack/salt into hotfix/immutable-lists-sum
2014-03-13 16:03:50 +00:00
Mathieu Le Marec - Pasquet
ab0b465d3e
Yet another fix for ImmutableProxyList
...
This is related to #11088 , #11035 , #11003 , #11190 .
2014-03-13 10:53:55 +01:00
Pedro Algarvio
e1c33dcad6
Revert "Stop running the test while it's failing"
...
This reverts commit a084303c91
.
2014-03-12 21:52:08 +00:00
Pedro Algarvio
a084303c91
Stop running the test while it's failing
2014-03-10 23:52:38 +00:00
Pedro Algarvio
fd1bab0d8d
Add test case which triggers #11003 .
2014-03-10 17:47:22 +00:00
Erik Johnson
98bcd26139
Fix pkg test with dots in filename
...
The package here is much smaller and should install quicker than the old
one.
2014-02-11 11:22:34 -06:00
Thomas S Hatch
8ce74e0378
disable dot test, need to find another package
2014-02-11 09:41:10 -07:00
Pedro Algarvio
3fceb028eb
Ignore and remove unused imports
2014-02-08 07:46:50 +00:00
Pedro Algarvio
fd306ea0b0
We need a bigger timeout, salt's repo is pretty big now.
2014-02-08 03:07:30 +00:00
Pedro Algarvio
b66418e263
Provide tests cases for #10197 and #10198
2014-02-05 21:56:08 +00:00
Thomas S Hatch
94a6b01522
Merge pull request #10011 from makinacorpus/fix10010
...
display full jinja traceback when applicable
2014-01-29 07:41:29 -08:00
Mathieu Le Marec - Pasquet
688abda402
display full jinja traceback when applicable
...
This fixes #10010
2014-01-29 02:04:12 +01:00
Mathieu Le Marec - Pasquet
165b5e4af2
Handle better state errors
...
This fixes #9983 .
2014-01-28 16:01:34 +01:00
FELD Boris
43889c7d79
Add a test for git states support of numeric revision
2014-01-15 17:20:08 +01:00
Pedro Algarvio
106c44587e
Merge pull request #9701 from s0undt3ch/hotfix/ssh-binaries
...
Skip the tests if binaries are missing.
2014-01-11 14:47:14 -08:00
Pedro Algarvio
2bb11d24b9
Skip the tests if binaries are missing.
2014-01-11 14:38:17 -07:00
Pedro Algarvio
c8038d87b1
Use KNOWN_BINARY_NAMES
from salt.modules.virtualenv
2014-01-11 12:19:29 -07:00
Thomas S Hatch
b90b4a0db8
Set tests to refresh fs list cace with every check
2014-01-09 15:10:42 -07:00
Pedro Algarvio
2cab3227fd
The virtualenv binary can have multiple CLI names.
2014-01-02 20:27:18 +00:00
Mike Place
ca57a864b8
Increase timeout for pkg tests.
...
* Since we started running a refresh_db in pkgrepo (7c3d0cc80d
), we may be checking an exit code prematurely. This increases the timeouts to 120 seconds to see if Jenkins will calm itself.
2013-12-30 11:08:32 -07:00
Pedro Algarvio
27a32c5849
Catch the proper exception. White-space fixes.
2013-12-13 08:12:00 +00:00
Thomas S Hatch
781bfe2455
remove reduntant faulty test
2013-12-12 15:18:36 -07:00
Thomas S Hatch
7957455ff9
some pylint fixes for mysql tests
2013-12-12 14:56:45 -07:00
regilero
f1b6b4af55
MySQL tests: add a localhost target on mysqladmin test to check for MySQL server presence
2013-12-12 21:23:52 +01:00
regilero
9195f8e5f7
Lint fix
2013-12-11 14:40:42 +01:00
regilero
3b14cd7cb4
Merge remote-tracking branch 'upstream/develop' into mysql_additions
2013-12-11 00:56:56 +01:00
regilero
82c1cb8e64
MySQL states, grants integration tests
2013-12-11 00:54:05 +01:00
regilero
f980c64bc4
MySQL Module: remove use_unicode connection attribute, not needed for charset managment and would create new bugs with unicode() strings
2013-12-10 23:07:13 +01:00
Pedro Algarvio
2648ed90ba
Fix lint issues.
2013-12-09 20:02:25 +00:00
Thomas S Hatch
8408c1a583
Merge pull request #9053 from regilero/utf8-sls
...
Proposal for utf-8 support in sls files
2013-12-09 10:41:15 -08:00
regilero
6c0b53547d
MySQl: fix states integration tests
2013-12-08 17:10:37 +01:00
Erik Johnson
e618befaf8
Add test case for numeric GECOS data
2013-12-06 16:16:38 -06:00
regilero
3769474d9d
One more test,to be sure
2013-12-05 18:50:31 +01:00
regilero
bd9a0394ae
Integration tests for issue #8947 utf-8 in sls
2013-12-05 18:18:20 +01:00
regilero
b376d1a82b
MySQL States integration module with db tests
2013-12-04 22:33:33 +01:00
Erik Johnson
093065b130
add test for #8614
2013-11-30 22:00:05 -06:00
Pedro Algarvio
8d3e3d3402
Skip the test if python-apt
is not installed for Debian like systems.
2013-11-28 19:26:21 +00:00
Pedro Algarvio
d02a2bc224
Include the python encoding file header on tests.
2013-11-27 11:19:24 +00:00
Thomas S Hatch
eb9ba6fda0
Merge pull request #8756 from s0undt3ch/issues/8343-require_in-KeyError
...
Fix accomulator issues
2013-11-26 13:18:49 -08:00
Erik Johnson
05de056df0
Add an assert to ensure that the state.sls return dict isn't empty
2013-11-25 17:41:03 -06:00
Erik Johnson
1c9f2fc224
Remove grains requirement
...
I had this code here in an early draft of this test, but the grains are
no longer needed here as the stuff that requires grains has been moved
out of the test function and into the SLS files that are run by the
test.
2013-11-25 17:30:18 -06:00
Erik Johnson
a77357f01d
Fix pkgrepo tests when python file is run by itself on CLI
2013-11-25 17:27:26 -06:00
Erik Johnson
c2e346835c
Add pkgrepo tests for CentOS
...
Ubuntu ones will follow soon.
2013-11-25 17:20:32 -06:00
Pedro Algarvio
f0bf78cdc0
Correct the state test case and respective expected output.
2013-11-24 12:15:20 +00:00
Pedro Algarvio
a752421b87
Expose a copy of the state dictionary to state functions.
...
Fixes #8343 since `__sls__` is now available in `__state__` and not on `kwargs`.
Closes #8709 since it's not the right approach.
Fixes #8710 and closes #8711 since I've cherry-picked the fix for #8710 in from #8711 .
2013-11-24 11:08:33 +00:00
Pedro Algarvio
54fc502de0
Some more saltenv related tests.
2013-11-12 06:29:55 +00:00
Pedro Algarvio
d88d34ca24
The GitHub IP changed.
2013-11-11 07:45:10 +00:00
Pedro Algarvio
77101231f2
Install a smaller and with less dependencies package.
2013-11-07 22:09:36 +00:00
Colton Myers
78662d270b
Merge pull request #8325 from cachedout/#7860
...
Add a dir_mode to file.managed
2013-11-07 09:35:54 -08:00
Mike Place
2e6bf21635
Integration testing for file.managed dir_mode argument.
...
Added documentation for dir_mode to file.managed.
2013-11-07 10:19:16 -07:00
Pedro Algarvio
ec0a4bca8e
URL environment selection should also be using saltenv
.
2013-11-06 23:36:40 +00:00
Pedro Algarvio
962f8d4149
Support adding files to the testing prod state env.
2013-11-06 20:18:47 +00:00
Pedro Algarvio
c170d1e572
Updated test cases to include environment selection in states using __env__
.
2013-11-06 20:04:54 +00:00
Henrik Holmboe
77fd1acb7f
Change assertEquals to assertEqual
...
According to
http://docs.python.org/2/library/unittest.html#deprecated-aliases
assertEquals is a deprecated alias of assertEqual.
2013-10-24 11:39:04 +02:00
Erik Johnson
95efdad8ba
Remove ubuntu 32-bit target
2013-10-20 21:47:05 -05:00
Erik Johnson
7984a8c2cf
Apparently the test framework doesn't like private member functions
2013-10-20 21:46:06 -05:00
Erik Johnson
81434578fc
Fix function name
2013-10-20 21:29:36 -05:00
Erik Johnson
1c0d279c59
Fix import error
2013-10-20 20:50:28 -05:00
Erik Johnson
9397840021
More tweaks to package tests
...
This makes package tests work better on CentOS 5, and also adds a 32-bit
target for Ubuntu.
2013-10-20 20:27:45 -05:00
Erik Johnson
90d6d045f1
Move _wait_for_pkgdb_unlock inside of PkgTest class
2013-10-20 18:48:01 -05:00
Erik Johnson
63ee0f1e83
Add function to wait for pkgdb lock to clear
...
Arch pkg tests that call pkg.latest_version seem to fail on running
this function due to the package database still being locked from
previous tests. This adds a function that waits (in 5 second increments)
for up to 60 seconds for the pkgdb to be unlocked.
http://jenkins.saltstack.com/job/salt-rs-arch/474/artifact/salt-runtests.log/*view*/
2013-10-20 18:18:35 -05:00
Erik Johnson
c5f5b400e9
adjust redhat pkg targets for pkg tests
2013-10-20 17:04:27 -05:00
Erik Johnson
62a9385ddf
Don't perform version spec pkg tests on FreeBSD
...
pkg_add does not support this, so this test will fail when
pkg.latest_version is run and an assertion is done to determine the
targeted version.
2013-10-20 16:00:14 -05:00
Erik Johnson
5dc08d552a
adjust pkg targets for pkg tests
2013-10-20 15:48:57 -05:00
Erik Johnson
fe1c4487e3
add tests for installing 32-bit packages
2013-10-20 15:16:36 -05:00
Erik Johnson
c7fcc79747
Add tests for pkg.installed with version specification
2013-10-20 14:35:10 -05:00
Erik Johnson
9d75d7a425
Change packages for pkg.installed tests on Debian-based systems
...
Travis-CI uses Debian/Ubuntu VMs and bzr is on their base image, so this
causes these tests to fail on Travis. This replaces bzr for tests on
Debian-based OSes.
2013-10-19 10:48:10 -05:00
Erik Johnson
0205f28e4a
Add pkg.installed tests
2013-10-19 09:50:48 -05:00
C. R. Oldham
66e3be46d1
Make sure multiple names clauses retain same order
2013-10-18 14:57:48 -06:00
Pedro Algarvio
e7ddf159a1
Make sure there's a line break before writing new key. Fixes #7409 .
2013-09-28 00:00:26 +01:00
Pedro Algarvio
2f3ed58541
Add test case which verifies the occurrence of #7409 .
2013-09-28 00:00:25 +01:00
Pedro Algarvio
bacd2264ee
State calls now fail if non-supported arguments are used. Fixes #6962 .
...
* Removed `format_call` from `salt.state.State` since it was almost a one to one copy of `salt.utils.format_call`.
* The `format_call` in `salt.utils` was modified to accept initial return data(to provide the functionality from the removed `State.format_call`.
* While the function arguments are being queried/matched, those used are removed from a copy of the passed data. Once finished, any remaining keyword arguments which do not match those allowed on the `expected_extra_kws` keyword argument to `format_call` will raise a `SaltInvocationError`.
This will prevent any future bogus bug searching like what happened on #6912 because the wrong state function argument was being passed.
2013-09-24 22:08:07 +01:00
Seth House
ea657eed48
Added unit and integration tests for the file.replace functions
2013-09-20 17:01:57 -06:00
Pedro Algarvio
e18ba0758b
Don't include authorship in generated documentation, the Sphinx way.
2013-09-16 17:24:00 +01:00
Pedro Algarvio
a8e70d527e
List pip from the right place.
2013-09-11 10:54:43 +01:00
Thomas S Hatch
80f4aff88c
Merge pull request #7143 from s0undt3ch/hotfix/pip-tests
...
Adapt and fix the changes from #6833
2013-09-10 21:08:06 -07:00
David Anderson
b383440302
Fix issue 6800. cwd=target was being passed to _run_check which blew up if target dir did not already exist.
2013-09-10 13:45:30 -06:00
Pedro Algarvio
fc5212dce0
Add a test case for #6833 . Refs #7130 .
2013-09-10 10:52:17 +01:00
Pedro Algarvio
6d446ffa56
Use the requires_system_grains
decorator from salt-testing
2013-09-04 20:05:41 +01:00
Pedro Algarvio
38bfa49e53
SuSE based distributions get the gid
from users
not the gid
from it's name. Fixes #7003 .
...
Full explanation about why is this can be seen here:
https://github.com/saltstack/salt/issues/7003#issuecomment-23813071
2013-09-04 19:41:20 +01:00
Pedro Algarvio
9eac31d6dd
Use proper pip mirrors in integration.states.virtualenv.VirtualenvTest.test_issue_2594_non_invalidated_cache
2013-08-30 19:32:39 +00:00
Pedro Algarvio
20c45fbb6d
Updated test case to install from a requirements file.
2013-08-29 20:21:23 +00:00
Pedro Algarvio
610c30f359
pip.installed
ownership testcase using user
instead of runas
. Refs #6912 .
2013-08-29 17:30:27 +00:00
Pedro Algarvio
a38077248f
Verify proper owner for pip.installed
. Refs #6912
...
Added test case which verifies that the owner of the `pip.installed` package is the one provided by `runas`.
2013-08-29 17:30:27 +00:00
Pedro Algarvio
1a12829637
Switched arguments in SaltReturnAssertsMixIn.assertInSaltReturn()
2013-08-22 19:02:17 +01:00
Pedro Algarvio
2c09600ea4
Switched arguments in SaltReturnAssertsMixIn.assertNotInSaltReturn()
2013-08-22 19:02:17 +01:00
Pedro Algarvio
ae5d9f5038
Switched arguments in SaltReturnAssertsMixIn.assertNotInSaltComment()
2013-08-22 19:02:17 +01:00
Pedro Algarvio
b880af89e1
Switched arguments in SaltReturnAssertsMixIn.assertInSaltComment()
2013-08-22 19:02:17 +01:00
Pedro Algarvio
1068406ca5
Fixed integration.states.pip.PipStateTest.test_pip_installed_errors
error regex.
...
It was failing to match on FreeBSD.
2013-08-14 12:29:34 +01:00
Pedro Algarvio
90d375d14e
If SHELL
is not in the environ, the error message is different.
2013-08-13 14:17:41 +01:00
Erik Johnson
113e5e9b52
Update assert in test_pip_installed_weird_install
...
Pull #6574 changed the state output slightly, breaking this test. This
commit fixes the test.
2013-08-08 18:43:44 -05:00
Pedro Algarvio
5c3a406e17
Let us not use a deprecated option ourselves unless for testing the deprecation.
2013-07-13 19:55:50 +01:00
Pedro Algarvio
a886eaa03d
Add a state integration test case for #5940 .
2013-07-05 23:00:14 +01:00
Pedro Algarvio
dea912d8a0
The result of ssh_known_hosts
changed in 8f728fb
, so should the test case.
2013-07-02 11:25:11 +01:00
Pedro Algarvio
d7f2856365
Updated integration.states.virtualenv
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:03 +01:00
Pedro Algarvio
afae35f14e
Updated integration.states.user
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:03 +01:00
Pedro Algarvio
18752a83cc
Updated integration.states.svn
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:03 +01:00
Pedro Algarvio
aeadc52132
Updated integration.states.supervisord
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:03 +01:00
Pedro Algarvio
2ef34d1fd6
Updated integration.states.ssh
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:03 +01:00
Pedro Algarvio
f3b145b118
Updated integration.states.rabbitmq_vhost
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:03 +01:00
Pedro Algarvio
e6791ee851
Updated integration.states.rabbitmq_user
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:02 +01:00
Pedro Algarvio
f55263631d
Updated integration.states.pip
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:02 +01:00
Pedro Algarvio
7c49cf1cdc
Updated integration.states.match
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:02 +01:00
Pedro Algarvio
c92568da9e
Updated integration.states.host
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:02 +01:00
Pedro Algarvio
415c3560e2
Updated integration.states.git
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:02 +01:00
Pedro Algarvio
a75c24dd5f
Updated integration.states.file
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:02 +01:00
Pedro Algarvio
671787d8cb
Updated integration.states.compiler
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:02 +01:00
Pedro Algarvio
34ccae8c46
Updated integration.states.cmd
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:02 +01:00
Pedro Algarvio
6dfe563ce1
Added support for __main__
execution.
2013-06-28 00:12:57 +01:00
Pedro Algarvio
be6814fe52
Added support for __main__
execution and formatting fixes.
2013-06-28 00:12:57 +01:00
Pedro Algarvio
663f54ef9f
Update copyright years of changed files. Added __main__
execution to tests/integration/states/pip.py
.
2013-06-28 00:12:57 +01:00
Pedro Algarvio
222be7b446
Make sure every test module is runnable by __main__
.
...
* Double to single quotes
2013-06-28 00:12:56 +01:00
Pedro Algarvio
be54a503d9
Adapted code fix sys.path
in case called from __main__
. Adapted to salt-testing.
2013-06-28 00:12:56 +01:00
Thomas S Hatch
982df86d6b
disable svn tests
...
These tests are causing problems since the svn repos are not always
returning the same data
2013-06-19 00:24:16 -06:00
Christian Franke
e46276db16
Improve file.directory for clean=True
...
Handle exclude_pat when running with test=True and add
some tests to verify correct behavior.
2013-06-11 02:28:51 +02:00
Ollie Walsh
32b80759d7
Reuse virtualenv for all supervisor tests
2013-05-29 12:54:57 +01:00
Ollie Walsh
1eca34f8e6
Give supervisor a little time to startup during tests
2013-05-29 11:39:09 +01:00
Ollie Walsh
57cba99b06
Supervisor module:
...
Support running supervisor from a virtualenv/custom path.
Support custom supervisor config file.
Create real tests using a virtual environment.
Supervisor state:
Fix restart when process is already running.
Support restart on watch.
Create real tests using a virtual environment.
2013-05-29 00:18:12 +01:00
Thomas S Hatch
ab9fbc94e7
Single quotes
2013-05-28 15:09:40 -06:00
Chris Rebert
c487d86fff
tests: standardize to modern 'except FooError as err:' syntax
2013-05-03 19:55:50 -07:00
Chris Rebert
498d2999db
more typo fixes
2013-05-01 16:52:52 -07:00
Chris Rebert
9ed364980d
is not 0 => != 0
2013-04-30 10:32:21 -07:00
Pedro Algarvio
55b166f38c
Fix issues around salt.modules.file
, salt.states.files
and respective tests.
...
* Updated `salt.modules.file.makedirs` to properly work. Any path passed to this function should be a directory, ie, if `/tmp/foo/bar` is passed, `/tmp/foo/bar` should be a directory, not `/tmp/foo`.
* Since `salt.modules.file.makedirs` was updated, `salt.states.file.append` needed to be updated to pass the proper directory to create.
* Minor formatting change
2013-04-25 16:36:19 +01:00
Thomas S Hatch
a85d1d4da1
Add extra not to file path, another test is laying it down
...
which was breaking this one
2013-03-23 14:41:27 -06:00
Jim Dalton
c774eccb1f
Skip these tests if svn is not available.
2013-03-18 15:19:35 -07:00
Jim Dalton
316a7d9d2d
Add tests for states.svn. Ensure svn.latest includes changes in return
2013-03-16 07:33:04 -07:00
Roberto Aguilar
9631a63cb6
Added show_diff kwarg to file.managed.
...
This can be set on a per-file basis so that potentially-sensitive
content can be omitted from logs.
2013-03-13 11:07:56 +00:00
Colton Myers
b473e6882f
Remove empty group tests (you can't have a user in no groups)
2013-03-12 15:19:03 -06:00
Pedro Algarvio
e052116d32
Add back test_user_if_present_with_gid
.
...
Some systems have the nobody user with the nogroup instead of nobody as it's group.
2013-03-12 07:22:52 +00:00
Thomas S Hatch
4720093d66
Remove faulty test
...
Can't pass a group name in as the gid, a gid is required
2013-03-12 00:11:48 -06:00
Thomas S Hatch
dbd0b386dc
single quotes
2013-03-12 00:00:30 -06:00
Thomas S Hatch
a4ca7a5f6f
Change to a symlink that does not exist
2013-03-11 23:44:31 -06:00
Pedro Algarvio
acb866762e
Fix expected comment in testcase states.pip.PipStateTest.test_pip_installed_weird_install
.
2013-03-12 04:03:12 +00:00
Thomas S Hatch
7c8ca7e1d6
remove recursive git test
...
The problem here is that we will need to create a small static
git repo somewhere first, relying on the mozilla one causes
other tests to fail due to timeouts and makes the test run VERY
long
2013-01-14 22:55:24 -07:00
Thomas S Hatch
2ca04f4671
Stop downloading giant git repos in the test suite
...
THIS WAS NOT OK!!!
2013-01-14 22:51:21 -07:00
Pedro Algarvio
0bf51ba5b0
Allow a test to specify it's own run_function
timeout. Increase timeout for some tests.
2013-01-14 14:07:58 +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
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
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
4348734697
Add integration.SaltReturnAssertsMixIn
where it was lacking in previous commits.
2012-12-07 17:13:58 +00:00