Pedro Algarvio
60f215f191
Add from __future__ import absolute_import
2015-01-30 22:25:04 +00:00
Antoine Jacoutot
1ef276575f
tests: recognize OpenBSD
2014-09-04 10:23:59 +02:00
Daniel Bradshaw
0a7546b1b1
Correct import
2014-01-29 18:01:35 +00:00
Pedro Algarvio
d02a2bc224
Include the python encoding file header on tests.
2013-11-27 11:19:24 +00:00
Pedro Algarvio
a192d03ffb
Only delete the file if it actually exists.
2013-11-10 15:36:39 +00:00
Pedro Algarvio
66cf8f1845
The argument name is arg
, not args
.
2013-11-10 15:36:11 +00:00
Pedro Algarvio
0f25353e08
Pass a relative path for proper test execution.
...
If we're trying to test a failure which happens when the path is not absolute, let's not pass it an absolute path in the first place.
2013-11-10 15:30:42 +00:00
Pedro Algarvio
ec0a4bca8e
URL environment selection should also be using saltenv
.
2013-11-06 23:36:40 +00:00
Pedro Algarvio
4a18003231
Error signatures changed, lets update test cases.
2013-09-24 22:08:08 +01:00
Pedro Algarvio
83d23d9be7
Use salt.utils.is_windows()
.
2013-09-24 22:08:08 +01:00
Thomas S Hatch
53f7227fdd
Add freebsd to grp covered platforms
2013-08-13 00:27:14 -06:00
Sebastian Vetter
11a9858c6b
Correct behaviour of when using list with cross-env file path
2013-06-30 23:19:16 +10:00
Pedro Algarvio
59bdfc532c
Updated integration.modules.file
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:00 +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
Ales Zoulek
383e1fa01c
Fixing invalid assumption on group name in tests
...
* fixed invalid assumption in file module tests that all linux platforms have
groups with the same name as users (joe:joe etc.). But for
example ArchLinux has only joe:users.
* file module tests now loads user's canonical group name from pwd and
grp python module instead.
2013-05-03 11:47:08 +02:00
Chris Rebert
498d2999db
more typo fixes
2013-05-01 16:52:52 -07: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
c5fe83272f
Even more open()
to salt.utils.fopen()
.
2012-11-18 18:57:10 +00:00
Daniel Miller
3a68a85a9b
Add "file.patch" module function
2012-10-18 12:20:39 -04:00
Thomas S Hatch
34829cd046
Clean up unused imports and variables
2012-08-30 14:14:02 -06: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
97a4c1dde2
Fix integration/modules/file.py
...
Since the tests are comparing results, switch to `assertEqual`'s.
2012-08-01 19:36:49 +01: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
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
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
Dan Colish
f91d947806
Simplify file.chgrp. Add file module test suite
2012-06-30 16:56:02 -07:00