Commit Graph

884 Commits

Author SHA1 Message Date
Pedro Algarvio
94f05e62fa Allow standalone test execution 2014-03-31 02:58:15 +01:00
Pedro Algarvio
f319ae5384 Allow standalone test execution 2014-03-31 02:57:34 +01:00
Pedro Algarvio
4208441175 Allow standalone test execution 2014-03-31 02:57:04 +01:00
Pedro Algarvio
328f3408b7 Allow standalone test execution 2014-03-31 02:56:33 +01:00
Pedro Algarvio
c010c443c5 Allow standalone test execution 2014-03-31 02:55:51 +01:00
Pedro Algarvio
25b8a60452 Allow standalone test execution 2014-03-31 02:54:37 +01:00
Pedro Algarvio
03f66d6874 Allow standalone execution 2014-03-31 02:42:36 +01:00
Pedro Algarvio
f7bd723e3f Add missing comma. 2014-03-29 01:26:02 +00:00
Thomas S Hatch
95ade395d6 Merge pull request #11511 from rallytime/darwin_sysctl_test
More darwin_sysctl tests
2014-03-25 14:23:20 -06:00
rallytime
27985060e2 Integration tests started for darwin_sysctl module 2014-03-25 13:52:54 -06:00
rallytime
334021d4a6 Removed unused variable 2014-03-25 11:21:47 -06:00
rallytime
b17164cfe8 More darwin_sysctl tests 2014-03-25 11:18:04 -06:00
Joseph Hall
33bf0bcdda Merge pull request #11503 from rallytime/darwin_sysctl_test
Pylint fix
2014-03-25 08:37:27 -06:00
rallytime
f192e8c202 Pylint fix 2014-03-25 08:26:40 -06:00
Thomas S Hatch
ef9fc46828 Merge pull request #11447 from s0undt3ch/hotfix/minion-events
Fix minion event trigger
2014-03-24 15:43:45 -06:00
Mike Place
de71f0b598 Merge pull request #11487 from rallytime/darwin_sysctl_test
Some unit tests for darwin_sysctl module
2014-03-24 13:10:18 -06:00
rallytime
81d29874ac Empty bottom line - pylint! 2014-03-24 13:06:09 -06:00
rallytime
ce52e33979 pylint 2014-03-24 13:04:35 -06:00
rallytime
1da1f32040 more darwin_sysctl module unit tests 2014-03-24 12:59:12 -06:00
rallytime
cfd86eeb49 Started unit tests for darwin_sysctl module 2014-03-24 12:22:17 -06:00
Pedro Algarvio
6fa685b1d2 Add some more files to the exempt ones 2014-03-24 17:02:23 +00:00
Pedro Algarvio
ed12816806 Update tests to new event classes signatures. 2014-03-24 16:54:31 +00:00
Pedro Algarvio
2c27ec8a8e Improve permissions check testcase. 2014-03-23 18:20:42 +00:00
Pedro Algarvio
ca76e31ac9 Allow standalone execution 2014-03-23 16:58:40 +00:00
Pedro Algarvio
3f2f5f3f76 Reuse existing vars. Allow standalone execution. 2014-03-23 16:57:51 +00:00
Thomas S Hatch
4af873dcaf Merge pull request #11337 from techdragon/fix-hightstate-failure-retcode
Fix for broken salt cmd return codes - issue #7013
2014-03-22 00:31:19 -06: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
Thomas S Hatch
7b48481c89 Merge pull request #11396 from kev009/get_fqhostname
Replace socket.getfqdn with internal salt.utils.network.get_fqhostname
2014-03-21 10:54:56 -06:00
Pedro Algarvio
5fa42543e3 Fix reference and allow standalone test excution. 2014-03-21 12:51:42 +00:00
Pedro Algarvio
f38b18ce7d Fix reference. 2014-03-21 12:48:06 +00:00
Pedro Algarvio
1825dfe635 Also test slicing 2014-03-21 12:45:54 +00:00
Pedro Algarvio
49bdbefb66 No more proxied immutables. Add test for nested immutables. 2014-03-20 23:59:38 +00:00
Kevin Bowling
14c9d75a92 Replace socket.get_fqdn with internal salt.utils.network.get_fqhostname 2014-03-20 14:37:23 -07:00
techdragon
e2a04d2877 Fixes & Updates
- fixed pep8 issue
- added more logic to check_state_result logic to handle list results properly and return false.
- ordered the check_state_result unit tests more logically. All the data type tests are now before the content & logic handling checks
- discovered duplicate test in check_state_result unit tests and removed it, both tests were asserting using the same data {'host': []}
2014-03-20 15:08:34 +08:00
rallytime
f2cff53756 Check if gid exists before adding group and associated tests 2014-03-18 13:02:20 -06:00
Thomas S Hatch
276a1f1e05 Fix file perm checker tests 2014-03-17 11:59:09 -06:00
Thomas S Hatch
05726ff088 Merge branch 'pyobjects_loader_and_map' of git://github.com/borgstrom/salt into borgstrom-pyobjects_loader_and_map
Conflicts:
	salt/utils/pyobjects.py
2014-03-17 10:23:43 -06:00
rallytime
6a54a92aa9 Removed list groups test 2014-03-17 09:55:41 -06:00
Pedro Algarvio
4c7d06a64a Test ImmutableList sum 2014-03-13 20:10:44 +00:00
Thomas S Hatch
d1bb711860 Merge pull request #11201 from galet/ini-missing-rows
ini_manage module: Preserve empty lines between options and comments.
2014-03-13 10:15:01 -06:00
Michal Galet
a50ee98e9b Cosmetic: Fix missing newline at the end of file. 2014-03-13 13:32:52 +01:00
Michal Galet
9093cf0364 ini_manage module: Preserve empty lines between options and comments. 2014-03-13 12:46:17 +01:00
Evan Borgstrom
4aec18b1e0 Refactor and modularize of the loader interface, adding Map to pyobjects
The problem with using the loaded states (see commit cc8539f) is that
you can end up in situations where a particular state doesn't exist for
whatever reason. This prevents you from building states freely (see
ticket #10918).

The refactor focuses on breaking out the `gen_functions` function into a
number of smaller reusable functions so that pyobjects can load all of
the states and still process `__virtual__()` and `__virtualname__` in a
way that makes sense for building states. After all pyobjects is just
compiling a high state data structure, if a state is available or not
during application time is up to the minion.

As part of this refactor I have also updated all of the inline comments
in the loader to be more consistent with the way things are actually
working now (such as `__virtual__()` returning a string being
deprecated).

There are also some pep8 fixes to the loader file.

Fix #10918

----

This also adds a new feature to pyobjects named `Map`, which allows for
definition of grain dependent data in a pythonic way -- using inner
classes.

----

Lastly this ditches the instance based registry and instead uses a class
based approach like a singleton.
2014-03-12 22:23:32 -04:00
Thomas S Hatch
ef0f3203e3 Add file type 2014-03-12 10:47:30 -06:00
Thomas S Hatch
0a0f4cdd8d Merge pull request #11149 from ze42/dev_replace
file.append(append/prepend_if_not_found)
2014-03-12 09:30:28 -06:00
Thomas S Hatch
0cbfb2e30a Merge pull request #11148 from galet/ini-missing-rows
Fix ini_manage to preserve empty options
2014-03-12 09:29:37 -06:00
Adrien "ze" Urban
68e88db671 file.replace(append_if_not_found) - test units 2014-03-12 10:44:00 +01:00
Michal Galet
5e99f1a60b Fixing formatting in ini_manage_test.py. 2014-03-11 23:41:53 +01:00
Michal Galet
99fcd43135 Fixing ini_manage module to preserve empty options. Added unit test for module to verify there are no regressions. 2014-03-11 23:35:01 +01:00
Thomas S Hatch
112542ca51 Merge pull request #11137 from ze42/dev_blockreplace
blockreplace - ensure newline before appending
2014-03-11 14:06:19 -07:00
Mathieu Le Marec - Pasquet
66e98055c9 cron: fix tests 2014-03-11 18:13:06 +00:00
Adrien "ze" Urban
ec314d4ef6 file.blockreplace(append_if_not_empty): test for missing \n at EOF 2014-03-11 18:46:01 +01:00
Mathieu Le Marec - Pasquet
cfa93f9f92 cron: Fix for #10959 2014-03-11 09:18:11 +00:00
Thomas S Hatch
790edd07ac Merge pull request #11024 from whiteinge/import_text
Added load_text filter and import_text tag to Jinja environment
2014-03-07 14:06:19 -08:00
Thomas S Hatch
8c6c608958 Merge branch 'serializers' of git://github.com/johnnoone/salt into johnnoone-serializers
Conflicts:
	doc/topics/yaml/index.rst
2014-03-07 14:53:03 -07:00
Seth House
c94cd38c65 Added unit test for the import_text tag 2014-03-06 17:30:47 -08:00
Mike Place
abf2487947 Merge pull request #11009 from rallytime/brew_test
Brew unit tests done for now
2014-03-06 13:29:31 -07:00
rallytime
b2b05f0e9d Brew unit tests done for now 2014-03-06 13:01:02 -07:00
Thomas S Hatch
9c2f02a7ef Merge pull request #10995 from jacksontj/develop
Fix check if the item doesn't exist in the ttl cache
2014-03-06 04:49:09 -08:00
Thomas S Hatch
e59fde745d Merge pull request #10983 from rallytime/brew_test
More brew module unit tests
2014-03-06 04:39:00 -08:00
Thomas Jackson
96c76f7a73 Add some unit tests for cache object 2014-03-05 18:12:20 -08:00
rallytime
f5f089b7a6 pylint fixes 2014-03-05 13:56:30 -07:00
rallytime
543a6943fc More brew module unit tests 2014-03-05 13:08:57 -07:00
Mike Place
697f4bf1ce Fix Jenkins test failure
Add build_shar.sh to list of files permitted to be u+x in the git
repo.
2014-03-05 10:59:54 -07:00
Thomas S Hatch
6d23350d85 Merge pull request #10910 from rallytime/brew_test
A couple more brew tests
2014-03-03 13:44:55 -08:00
rallytime
25c77b2559 A couple more brew tests 2014-03-03 13:51:42 -07:00
Thomas S Hatch
e32cf6e74f Merge pull request #10861 from georgemarshall/utils_fix
Fix utils.option to recurse dict keys
2014-03-03 10:34:28 -08:00
Mathieu Le Marec - Pasquet
b62c680b81 salt.modules.postgres: Quote all extension work
- Fix regressions in tests introduced by @ticosax (nevermind @ticosax i
  also regulary breaks them :p)
- Quote also alters.
2014-03-02 10:17:46 +00:00
George Marshall
8f66db2e0f Teach utils.option to fail so that it can succeed 2014-02-28 21:57:03 -08:00
Mike Place
5ce9c2cdf3 Pylint var names. 2014-02-28 00:05:03 -07:00
Mike Place
d39795dc3d Merge pull request #10847 from rallytime/brew_test
Started writing brew unit tests
2014-02-27 23:30:39 -07:00
rallytime
48e3f718ff pylint fixes 2014-02-27 21:33:50 -07:00
rallytime
00b8c3dc70 Started writing brew unit tests 2014-02-27 17:03:08 -07:00
Thomas S Hatch
52d3e6d83f Merge pull request #10839 from borgstrom/pyobjects_ids
Pyobjects ids
2014-02-27 15:29:06 -07:00
Mike Place
6a318faee3 Merge pull request #10836 from rallytime/mac_group_test
Wrote the rest of the mac_group unit tests
2014-02-27 14:13:58 -07:00
Evan Borgstrom
cc8e25e316 Rebuild StateRegistry storage so IDs across modules work
As it stands the following will fail as we didn't allow duplicate IDs
under any circumstances:

    with Pkg.installed("nginx"):
    	Service.running("nginx")

This commit changes the way the StateRegistry stores states to allow the
above example to work properly.

Now it behaves much more closely to the YAML + Jinja renderer.
2014-02-27 15:52:14 -05:00
rallytime
86f24555c5 pylint fixes 2014-02-27 13:05:16 -07:00
Evan Borgstrom
2e6371f65b Add test for duplicates, now to fix it 2014-02-27 15:04:27 -05:00
Thomas S Hatch
3813934f4a http://www.youtube.com/watch?v=v7NzBTRzCkg 2014-02-27 12:58:39 -07:00
Thomas S Hatch
b3f99f9833 Merge pull request #10776 from ticosax/fix-states.dockerio.run
Fix states.dockerio.run
2014-02-27 12:55:23 -07:00
rallytime
7eed870258 Wrote the rest of the mac_group unit tests 2014-02-27 12:54:45 -07:00
Mike Place
b94ba19e60 Warn us about suspect perms.
I've found cases where people have been setting permissions for files
and then those permissions are being pushed into git. This is annoying
at best and potentially dangerous at worst.

This test walks the tree and warns us about anything that's out of
order.
2014-02-27 11:33:27 -07:00
Thomas S Hatch
98360d799c Merge pull request #10741 from makinacorpus/fixcron
Support multiline cron comments
2014-02-26 09:59:28 -07:00
Nicolas Delaby
c6b5ade054 declare encoding 2014-02-26 16:31:38 +01:00
Nicolas Delaby
853b5f4a8f Add test for states.dockerio.run 2014-02-26 15:42:56 +01:00
Erik Johnson
b717319e82 Add "if __name__ == '__main__'" section to mac_group_test.py 2014-02-26 00:51:43 -06:00
Pedro Algarvio
695cf1aace {a, b} set() notation is not available in Python 2.6
Allow running the testcase filename alone.
2014-02-26 05:11:01 +00:00
Mike Place
0c5e074a04 Merge pull request #10745 from rallytime/mac_group_test
Started writing unit tests for mac_group
2014-02-25 14:44:45 -07:00
rallytime
bced074647 Started writing unit tests for mac_group 2014-02-25 14:02:54 -07:00
Thomas S Hatch
1a91817221 Merge pull request #10734 from rallytime/mac_user_test
More mac_user tests
2014-02-25 13:31:31 -07:00
Mathieu Le Marec - Pasquet
f9a116ee9c Support multiline cron comments
This fixes #10721.
2014-02-25 19:52:47 +00:00
rallytime
c58a6a53a3 More mac_user tests 2014-02-25 11:59:34 -07:00
Erik Johnson
6e50575049 Remove extraneous UTF8 coding line 2014-02-25 12:16:23 -06:00
Erik Johnson
f54ed36016 Add comment about importance of empty line 2014-02-25 11:55:10 -06:00
Pedro Algarvio
96849c526a Merge pull request #10724 from terminalmage/tests
Add three tests for minion_id generation
2014-02-25 09:23:59 +00:00
Erik Johnson
69ce44ed6f Add more get_id tests + some DRY fixes 2014-02-25 02:27:35 -06:00
Pedro Algarvio
ce9f923190 Test is now fixed. 2014-02-25 01:59:49 -06:00
Pedro Algarvio
284a2abfcb Get mock_open working.
Kind of since we're not using `mock_open` from the mocked library. Were
actually using the recipe to mock the builtin open as seen on http://goo.gl/dxMwPO
2014-02-25 01:59:30 -06:00
Erik Johnson
474e7590b9 Add test for salt.config.get_id() when /etc/hosts is parsed
This is a WIP, the mocking isn't quite working yet.
2014-02-24 23:46:00 -06:00
Erik Johnson
e720b57fcf Merge pull request #10701 from rallytime/mac_user_test
Wrote more mac_user tests, found and fixed bug
2014-02-24 15:22:17 -06:00
rallytime
500c17feef Wrote more mac_user tests, found and fixed bug 2014-02-24 12:33:28 -07:00
Pedro Algarvio
1354c212ee Merge pull request #10659 from rallytime/mac_user_test
Even more mac_user tests!
2014-02-22 17:21:57 +00:00
rallytime
4e1c73f9e9 Even more mac_user tests! 2014-02-21 16:11:09 -07:00
Mike Place
64f07ebc38 Merge pull request #10651 from rallytime/mac_user_test
more mac_user tests
2014-02-21 13:56:11 -07:00
rallytime
4a5bbd0c1d more mac_user tests 2014-02-21 13:49:17 -07:00
Thomas S Hatch
bde33497d2 Merge pull request #10645 from rallytime/mac_user_test
Test fixes
2014-02-21 12:09:46 -07:00
rallytime
5a80abeaee Test fixes 2014-02-21 11:13:38 -07:00
Xavier Barbosa
a3b87d1981 a little bit of lint 2014-02-21 13:49:54 +01:00
Xavier Barbosa
9f39d4171b added reset tag 2014-02-21 09:52:31 +01:00
Mike Place
f325ddc1a4 Merge pull request #10632 from rallytime/mac_user_test
More mac_user tests
2014-02-20 16:48:08 -07:00
rallytime
ed614934f7 More mac_user tests 2014-02-20 14:25:38 -07:00
Evan Borgstrom
796efac44f Update tests to use new syntax 2014-02-20 15:19:42 -05:00
Thomas S Hatch
7a3bf8aa85 Merge pull request #10600 from borgstrom/pyobjects_saltobject
Adding a object interface to __salt__ & __pillar__ (pyobjects)
2014-02-20 10:17:35 -07:00
Thomas S Hatch
6839eb1a56 fix cron test error in lint 2014-02-20 10:05:56 -07:00
Thomas S Hatch
a93bd0f596 Merge pull request #10593 from makinacorpus/cron
cron: better behavior of crontabs tracking
2014-02-20 10:04:59 -07:00
Xavier Barbosa
85a5c9e617 ensure that str are yaml friendly 2014-02-20 17:50:49 +01:00
Evan Borgstrom
7ed0eb576e Switch double to single quotes, fix pylint warning 2014-02-20 10:23:57 -05:00
Xavier Barbosa
ad9734e78f implement aggregation 2014-02-20 13:57:37 +01:00
Xavier Barbosa
9d32696939 implement serializers 2014-02-20 12:00:21 +01:00
Evan Borgstrom
adae60f44a Adding a object interface to the __salt__ dictionary
This is another suggestion from @mgwilliams. It adds an object to the
sls file scope named Salt, which dispatches its attributes to the
__salt__ dictionary.

For example, the following two lines are functionally the same:

    ret = Salt.cmd.run(bar)
    ret = salt['cmd.run'](bar)
2014-02-19 20:38:02 -05:00
Thomas S Hatch
2bb2d956c1 Merge pull request #10595 from rallytime/mac_user_test
Started testing mac_user module
2014-02-19 15:16:33 -07:00
Mathieu Le Marec - Pasquet
bfa176f110 cron: complete matching rework 2014-02-19 22:44:34 +01:00
rallytime
1e5d502d8a Started testing mac_user module 2014-02-19 14:10:52 -07:00
Mathieu Le Marec - Pasquet
90dc963c1c cron: better behavior of crontabs tracking 2014-02-19 20:39:44 +01:00
Joseph Hall
b6ea15b742 Merge pull request #10542 from rallytime/dnsutil_test
Final tests for dnsutil
2014-02-18 13:17:41 -07:00
rallytime
56e89ac1f2 final tests for dnsutil 2014-02-18 12:36:09 -07:00
Thomas S Hatch
7d2d219560 Merge pull request #10539 from rallytime/dnsutil_test
Dnsutil test
2014-02-18 11:13:31 -07:00
rallytime
5d38a2faa3 Merge branch 'develop' of https://github.com/saltstack/salt into dnsutil_test 2014-02-18 10:48:30 -07:00
rallytime
94128532d2 started new dnsutil_test 2014-02-18 10:45:43 -07:00
Evan Borgstrom
e80e39032e Support including & extending 2014-02-17 21:31:06 -05:00
Evan Borgstrom
72cb2ab35b Add pyobjects tests 2014-02-17 19:54:56 -05:00
Pedro Algarvio
7a42bf24fc Jinja's sequence filter does not need to be an extension. 2014-02-15 17:26:35 +00:00
Thomas S Hatch
14e79ea857 Merge pull request #10379 from johnnoone/jinja-filter
fix jinja SequenceExtension
2014-02-14 22:39:30 -07:00
Thomas S Hatch
67205e2106 whitespace 2014-02-14 16:34:03 -07:00
Thomas S Hatch
ef26e5efc8 Merge pull request #10450 from rallytime/dnsutil_test
One more dnsutil test
2014-02-14 13:54:24 -07:00
rallytime
647122cc55 lint fixes 2014-02-14 13:44:36 -07:00
rallytime
e8fbd5cd01 import fix 2014-02-14 13:06:58 -07:00
rallytime
9c4dd8232a Merge branch 'develop' of https://github.com/saltstack/salt into dnsutil_test 2014-02-14 12:54:00 -07:00
Thomas S Hatch
e6b0a27281 Merge pull request #10403 from terminalmage/10367
dig.SPF fixes
2014-02-14 12:52:00 -07:00
rallytime
d03b816c5b Merge branch 'develop' of https://github.com/saltstack/salt into dnsutil_test 2014-02-14 12:45:22 -07:00
rallytime
20cb9de36f One more dnsutil test 2014-02-14 12:42:59 -07:00
Thomas S Hatch
fd5500724b Merge pull request #10229 from kaithar/feature/enhanced-mysql-pillar
Proposal: enhanced mysql pillar
2014-02-14 12:40:06 -07:00
Erik Johnson
a263a088e5 fix pylint (add blank line) 2014-02-13 13:34:53 -06:00
Erik Johnson
90304e05ee Fix dig tests
Added a side_effect function to allow for testing of recursive functions
in the SPF tests. Also enabled all skipped tests as they now all pass.
2014-02-13 12:38:11 -06:00
Xavier Barbosa
d7eb1d2f9d fix jinja SequenceExtension 2014-02-13 08:59:29 +01:00
Erik Johnson
5c446c50dd Fixed unit tests
Had to skip two tests because I don't know how to mock properly when
recursion is involved.

Also made some PEP8 fixes.
2014-02-12 20:17:52 -06:00
Thomas S Hatch
ae961b689d remove unused import 2014-02-12 16:02:21 -07:00
rallytime
661ed0ef2d Started testing dnsutil 2014-02-12 14:53:58 -07:00
rallytime
2035e7d153 Added S0undt3ch's skipIf suggestion 2014-02-12 11:04:35 -07:00
rallytime
1b55edd4fb We cannot use the requires_salt_modules decorator because we do not inherit from an integration test class. 2014-02-12 10:36:22 -07:00