Commit Graph

212 Commits

Author SHA1 Message Date
Pedro Algarvio
a977a4f4fa Don't ignore environment variables pointing to valid configuration files. Fixes saltstack/salt-cloud#661
`salt.config.load_config()` cannot be hard-coded to use only the master configuration file as the default configuration file path to know if the user has passed any configuration file in the CLI tool or not.
To fix this, `default_path` was added. This way, the minion config or client config or even the salt cloud config can say which is the expected default path of the configuration file and properly load config from environment variables.
2013-06-28 20:39:37 +01:00
Pedro Algarvio
6e061b5d24 Updated unit.utils.verify_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
bdf808773d Updated unit.utils.safe_walk_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
0675fae89c Updated unit.utils.runtime_whitespace_regex_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
155987dc08 Updated unit.utils.path_join_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
6e1f36fb22 Updated unit.utils.find_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
f35367613e Updated unit.utils.filebuffer_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
2081aff707 Updated unit.utils.event_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
4a875f5b35 Updated unit.templates.jinja_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
c04cc4a945 Updated unit.states.rvm_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
b13340e5ea Updated unit.states.gem_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
0631e31cb1 Updated unit.modules.win_status_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
86564ba1ce Updated unit.modules.rvm_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
7a5872b498 Updated unit.modules.postgres_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
9df34a39d7 Updated unit.modules.pip_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
99d828a650 Updated unit.modules.gem_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
2097684c0a Minor formating changes. 2013-06-28 00:12:59 +01:00
Pedro Algarvio
cb0922faf7 Updated some of the test cases to use a much more readable approach using salttesting.helpers.ensure_in_syspath(). 2013-06-28 00:12:59 +01:00
Pedro Algarvio
6dfe563ce1 Added support for __main__ execution. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
d245b17412 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
Thomas S Hatch
90c5cc8c4d list_, not _list 2013-05-28 23:54:38 -06:00
Thomas S Hatch
95780ff219 Fix ref no non func alias in rvm test 2013-05-28 14:53:40 -06:00
Thomas S Hatch
8d018e0b8c make gem test ref non func alias 2013-05-28 14:35:26 -06:00
Matt George
ecdff63b6e added ability to activate a virtualenv before
running pip install
2013-05-17 13:56:09 -05:00
Sylvain Fankhauser
101b9d2f2e Rename build_whitepace_splited_regex to build_whitespace_split_regex 2013-05-15 12:48:08 +02:00
Thomas S Hatch
f1697aea5b Fix test where the absence of mock breaks things 2013-05-07 22:42:08 -06:00
Thomas S Hatch
367927b3d3 Fix #4912
Clint, this fixes it for me and still logicaly verifies the test
let me know if this works on your end
2013-05-07 22:36:34 -06:00
Daniel Watkins
7e7bf244c7 Move caching of requirements to helper function and add unit tests. 2013-05-07 10:20:56 +01:00
Chris Rebert
c487d86fff tests: standardize to modern 'except FooError as err:' syntax 2013-05-03 19:55:50 -07:00
Thomas S Hatch
829b2ca993 sort directory data to ensure consistent data set 2013-05-02 23:23:22 -06:00
Thomas S Hatch
f65515d57c Fix safe_walk test 2013-05-02 23:07:06 -06:00
Daniel Miller
b5d130cc3a Fix symlink recursion in salt.utils.safe_walk 2013-05-02 13:32:21 -04:00
Chris Rebert
498d2999db more typo fixes 2013-05-01 16:52:52 -07:00
Chris Rebert
26209c1fc1 rm unused imports reported by pyflakes 2013-04-30 14:48:04 -07:00
Thomas S Hatch
ab5f540430 Merge pull request #4232 from tohojo/ipv6-support
IPv6 support for master-minion communication
2013-04-28 18:34:28 -07:00
Pedro Algarvio
5f58f0d28b We need OrderedDict support. So, as a last resort, provide our own.
* We try to import `OrderedDict` from the standard library, which is only available on python >= 2.7, if `ImportError` is raised we try to import it from `ordereddict`, a package available in PyPi. As a last resort, we provide our own implementation based on http://code.activestate.com/recipes/576669/.
* Update all code requiring `OrderDict` to use our compatible import module.
2013-04-23 12:56:23 +01:00
Pedro Algarvio
0d5c3b5f0c Add cmd.run_all to __salt__. Required for the unit test. 2013-04-22 22:26:05 +01:00
Denis Generalov
1b1a5bd743 fix unit tests 2013-04-05 18:21:33 +04:00
G.Tjebbes
60af610e3f Ref #4361 : add some unit tests on pip's args 2013-04-03 23:41:17 +02:00
Toke Høiland-Jørgensen
5b6e17474b IPv6 address literals should be specified without brackets in config files. 2013-03-23 23:57:23 +01:00
Toke Høiland-Jørgensen
0f0a7cf560 Add a unit test for passing IPv6-formatted addresses to verify_socket. 2013-03-23 23:34:47 +01:00
Colton Myers
e277154c18 Fix patch.multiple (wrong order on function defs) 2013-03-21 17:26:12 -06:00
Colton Myers
99d0a34dc2 Define patch.multiple 2013-03-21 17:21:26 -06:00
Colton Myers
d42e9d8b63 Wrap extra Mock() references 2013-03-21 17:09:16 -06:00
Colton Myers
7d6c2ffcd3 Add skipIf decorator 2013-03-21 17:00:53 -06:00
Colton Myers
46f6145310 Remove trailing whitespace and fix PEP8 issues 2013-03-21 16:49:41 -06:00
Colton Myers
d3314e231b Wrap mock import to avoid ImportErrors 2013-03-21 16:48:18 -06:00
Roberto Aguilar
f3b46d7460 Fixed tabs 2013-03-12 11:20:54 -07:00
Roberto Aguilar
18ba416554 Added default runas for postgres functions.
On BSD the default runas user is pgsql, on other systems it's postgres.
2013-03-12 18:10:46 +00:00
Jack Kuan
deee61c51a Fix a regression in the stateconf renderer and updated docs. 2013-03-01 09:35:45 -05:00
Pedro Algarvio
1795fbe591 Commented out test case which is failing since 209c566010. @vlaci could you have a look please? 2013-02-17 12:05:11 +00:00
Roberto Aguilar
c0c67a7509 Added test for limit in file.sed. 2013-02-13 14:36:34 -08:00
Jack Kuan
ede7d9a762 Added doc for render time state execution and also fixed a bug with the feature. 2013-02-10 00:37:31 -05:00
Jack Kuan
fa7e327baf Fix the merge conflicts in tests/unit/pydsl_test.py 2013-02-09 21:28:35 -05:00
Thomas S Hatch
f65626db0b Update pydsl tests, still failing though 2013-02-09 15:07:59 -07:00
Thomas S Hatch
e63a01f853 Add docstring 2013-02-09 14:41:16 -07:00
Thomas S Hatch
ace2aade9f Fix binary file issue from merge 2013-02-09 14:40:31 -07:00
Thomas S Hatch
858e86d597 Merge branch 'pydsl_compile_time_state_execution' of git://github.com/kjkuan/salt into kjkuan-pydsl_compile_time_state_execution
Conflicts:
	tests/unit/pydsl_test.py
2013-02-09 14:31:36 -07:00
Jack Kuan
106cc0aa0e Move the pydsl module into salt/utils/. 2013-02-08 17:49:21 -05:00
Thomas S Hatch
42024cab39 Clean out unused code 2013-02-08 10:57:20 -07:00
Thomas S Hatch
b86a8d6da8 Pylint cleanup for salt log tests 2013-02-07 15:50:43 -07:00
Thomas S Hatch
59c4fdaf39 Merge pull request #3610 from s0undt3ch/develop
Fix test case and skip message.
2013-02-06 08:45:42 -08:00
Pedro Algarvio
df2ac900c3 Fix pydsl unittest skip message + PEP8. 2013-02-06 05:10:47 +00:00
Pedro Algarvio
f43b21516a Fix salt version unittest. 2013-02-06 04:59:26 +00:00
Jack Kuan
9bf7f72a43 Now calling a state(id declaration) at compile/render time executes it using salt['state.high']().
Also fixed a bug: Now we prevent the use of extend() after ordered execution was turned on once.
2013-02-05 14:50:40 -05:00
Jack Kuan
b7571dd891 Add support for #3483([pydsl] Import Python definitons from included files). 2013-02-01 12:32:19 -05:00
Jack Kuan
0976f42410 Fix test case skipping logic: if < py2.7 then no OrderedDict, so skip.
For ordered execution, PyDSL requires py2.7 or above. Although, it's
possible to make it work with a third-party OrderedDict implementation
like the yaml renderer does..., this is not bothered here.
2013-01-24 12:21:54 -05:00
Jack Kuan
5ad5cd9b6e Fix a bug in the pydsl test case. 2013-01-21 10:27:06 -05:00
Thomas S Hatch
99172816ea Merge pull request #3329 from mjarco/fix-config-options-defaults
Default options were never returned if omit_pillar flag was set to false (or unset)
2013-01-20 20:17:39 -08:00
Jack Kuan
897f877bed Added docs for pydsl and fixed a syntax inconsistency. 2013-01-20 01:21:05 -05:00
Pedro Algarvio
3629fe88c0 Fix tests.unit.pydsl_test and tests.unit.stateconf_test.
No more errors are shown because the configuration files are not readable, and in fact, the minion configuration can be use, unlike what was said in the comment.
2013-01-20 04:09:07 +00:00
Michał Jarco
77f898b0cb Simplistic tests (still better than none) 2013-01-19 15:02:06 +01:00
Pedro Algarvio
09bba5b054 git describe sha signatures have a length of 8 chars. 2013-01-19 05:07:41 +00:00
Pedro Algarvio
7694829219 Also include the number of commits after the found tag. 2013-01-19 04:38:36 +00:00
Pedro Algarvio
d3391f4db0 Harden git describe parsing so it does not fail on awkward situations.
This issue came up because a user is using custom tags and git describe for him is something like `debian/0.11.1+ds-1-3-ga0afcb`.
Added unittests for this.
2013-01-19 02:31:00 +00:00
Jack Kuan
a678901c48 Fix test cases for py2.6. 2013-01-18 14:14:42 -05:00
Jack Kuan
9c35844c56 Make pydsl work with stateconf.
- Added implicit ordering to pydsl.(turned on via __pydsl__.set(ordered=True))

- Fixed a KeyError bug in stateconf renderer that happens during id renaming.

- The stateconf renderer now generates a no-op start state as the
  "first" state in a sls file.(enabled via -s)

- Made the stateconf renderer take high state input via the new -p
  option, so we can pipe pydsl output into it.

- Added more and fixed some test cases for stateconf and pydsl.
2013-01-18 12:34:56 -05:00
Thomas S Hatch
a1de80e5c6 Merge pull request #3257 from mjarco/fix-local-jinja-template-resolution
Fix jinja template includes lookup with salt-call --local mode
2013-01-15 11:03:54 -08:00
Jack Kuan
791ca1cb44 Add test cases and fixed some corner cases. 2013-01-14 23:29:35 -05:00
Jack Kuan
a8b8a6eb18 Add a test module for pydsl and some bug fixes. 2013-01-14 23:29:35 -05:00
Michał Jarco
7f782afb14 Fixed jinja_tests.
File roots contains lists of paths for each env.
2013-01-14 08:58:27 +01:00
Thomas S Hatch
ad63c17227 overcome value error in win status test 2013-01-13 00:09:28 -07:00
Pedro Algarvio
c20cb1da51 Fix logging unit tests. Thanks @shadowfax-chc. 2013-01-08 03:41:59 +00:00
Pedro Algarvio
f8073a08eb Warn about low mock version instead of mock not available. 2013-01-04 17:45:06 +00:00
László Vaskó
7ff2ab7d58 win_status_test: added pid explicitly 2012-12-31 11:45:54 +01:00
László Vaskó
d6d9e9ce47 win_status: finalize COM library properly 2012-12-31 11:45:54 +01:00
László Vaskó
51150f1427 win_status: handle if CommandLine is None 2012-12-31 11:45:54 +01:00
Thomas S Hatch
a601af6955 Merge pull request #3071 from s0undt3ch/hotfix/pylint/C0103
Fixes for pylint's C0103 msgid
2012-12-30 20:22:42 -08:00
Thomas S Hatch
66ae9bcc67 Merge pull request #3080 from vlaci/master
'status.procs' function implementation and tests for windows
2012-12-30 20:03:07 -08:00
László Vaskó
ecef344c61 Added 'status.procs' function for windows 2012-12-31 01:34:38 +01:00
Pedro Algarvio
d8d9d14d5a Fix the stateconf unit test. Refs #1775 2012-12-29 22:19:17 +00:00
Ryan Schneider
8f8cc74b34 Some minor cleanup of unit and integration tests. 2012-12-18 17:39:16 -08:00
Thomas S Hatch
9d427c868d Merge pull request #2861 from s0undt3ch/hotfix/headers
Header updates. More copyright to the SaltSatck team. Code author to me(where applicable).
2012-12-11 04:50:37 -08:00
Pedro Algarvio
64a0d631e1 Fix rvm unit tests. 2012-12-11 11:27:21 +00:00
Pedro Algarvio
7c5a5d0bd3 Header updates. More copyright to the SaltSatck team. Code author to me(where applicable). 2012-12-11 10:23:37 +00:00
Pedro Algarvio
8d092afddc Don't assume digits in logging format strings. Refs #2859, fixes #2853.
Sorry @ryanschneider for stepping in on your fix.

Nothing is assumed now, and several checks are made. If any of the checks fail, nothing else is done in `salt.log.Logging.__new__()`.
Added a test case which will take care of possible regressions on this bug fix.
2012-12-11 10:10:03 +00:00
Henrik Holmboe
5bcce96761 Update import in unit test.
https://travis-ci.org/holmboe/salt/jobs/3563157
2012-12-08 10:37:26 +01:00
Henrik Holmboe
a607016198 Update import in unit test.
https://travis-ci.org/holmboe/salt/jobs/3563086
2012-12-08 09:44:51 +01:00