Justin Findlay
7c48cf7ea6
states.user int tests: check MacOS primary group
2016-03-10 10:57:20 -07:00
Justin Findlay
5d5ce619b7
states.user int tests: disable GECOS for MacOS
2016-03-10 10:57:20 -07:00
Andreas Lutro
ceda2b7274
users: integration test for empty GECOS fields
2015-08-07 09:25:21 +02:00
Colton Myers
313c46501d
Merge remote-tracking branch 'upstream/2015.2' into merge-forward-develop
...
Conflicts:
salt/auth/pam.py
salt/modules/boto_route53.py
salt/state.py
2015-04-24 10:19:03 -06:00
Viet Hung Nguyen
b13db32fde
add test for #18843
2015-04-22 16:21:23 +07:00
Pedro Algarvio
60f215f191
Add from __future__ import absolute_import
2015-01-30 22:25:04 +00:00
Erik Johnson
e618befaf8
Add test case for numeric GECOS data
2013-12-06 16:16:38 -06:00
Pedro Algarvio
d02a2bc224
Include the python encoding file header on tests.
2013-11-27 11:19:24 +00: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
afae35f14e
Updated integration.states.user
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:03 +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
Chris Rebert
9ed364980d
is not 0 => != 0
2013-04-30 10:32:21 -07: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
Ramón Cahenzli
a30f2ee244
This root or that root? :)
2012-12-11 16:37:30 +01: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
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
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
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
420bfe830b
Mark destructive tests with the destructiveTest
decorator.
2012-09-29 23:16:08 +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
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
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
Larry Price
6408f286b2
added two tests that will only be run if you are root.
2012-06-30 16:51:11 -07:00
Larry Price
aa95c9d26b
initial test case for user.
2012-06-30 09:43:44 -07:00