Commit Graph

238 Commits

Author SHA1 Message Date
Pedro Algarvio
66b6acd0e0 Updated integration.shell.matcher test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
331dc6d936 Updated integration.shell.minion test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
067f45f6ab Updated integration.shell.master test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
dfa110d5cc Updated integration.shell.key test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
495f8f0440 Updated integration.shell.cp test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
4c014ef284 Updated integration.shell.call test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
e772f0d8b6 Re-use salt-testing mixin. 2013-06-28 00:12:58 +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
e30ce41d7a we are far enough removed to not need to test version deps here 2013-06-19 12:43:27 -06:00
Pedro Algarvio
c0ead8b2dc Fix a misplaced continue on the grains matching logic which caused a traceback.
```
[21:18:46,004 [salt.utils.minions                          :200 ][ERROR   ] Failed matching available minions with grain pattern: planets:saturn
Traceback (most recent call last):
  File "/home/ubuntu/salt/salt/utils/minions.py", line 197, in check_minions
      }[expr_form](expr)
        File "/home/ubuntu/salt/salt/utils/minions.py", line 119, in _check_grain_minions
    str(match.lower()),
    AttributeError: 'list' object has no attribute 'lower'
```
2013-03-13 01:02:15 +00:00
Thomas S Hatch
d70ecc8387 Update doc test to -d changes 2013-03-11 23:27:18 -06:00
Thomas S Hatch
3d1cf71a77 Combine compound matcher tests 2013-02-08 10:57:20 -07:00
Thomas S Hatch
5b16fed6cc remove unused import 2013-02-07 17:39:20 -07:00
Thomas S Hatch
c5f5bd1e99 Fix tests to better reflect doc matching updates 2013-02-07 15:11:42 -07:00
Pedro Algarvio
aa721e89cf Fix integration.shell.call.CallTest.test_default_output. 2013-02-06 05:13:39 +00:00
Thomas S Hatch
a6df51ab1a Fix test failure due to update in the default nested outputter 2013-01-29 10:23:22 -07:00
Thomas S Hatch
a58202c2f7 Add compound matcher tests 2013-01-29 10:20:02 -07:00
Erik Johnson
77eeb47bea Add tests for nested grain/pillar matching
Also added tests for traditional grain matching when target grain is a
list.
2013-01-26 00:13:51 -06:00
Pedro Algarvio
44b45ffa0c Too much spaces(PEP-8). 2013-01-15 22:55:20 +00:00
Pedro Algarvio
b1488b61c5 Fix integration.shell.key output tests. 2013-01-15 21:53:29 +00:00
Pedro Algarvio
4adaab4dce Update tests to the new deprecation message. 2013-01-15 19:42:01 +00:00
Thomas S Hatch
89525ad6d0 remove pre 0.12.0 test handles 2013-01-15 00:10:19 -07:00
Thomas S Hatch
1ddcd715fb Reached 0.12, fix outputter test 2013-01-14 23:40:20 -07:00
Thomas S Hatch
a24ff1852a remove unused import 2013-01-14 21:50:56 -07:00
Pedro Algarvio
36955b4560 Fix integration.shell.matcher.MatchTest.test_ipcadr.
Was skipping because of the latest output changes and how output parsing was done.
2013-01-14 13:04:23 +00:00
Thomas S Hatch
bdae844eec fix outputter tests that come with changes in the default outputter 2013-01-13 00:01:30 -07:00
Pedro Algarvio
ab74952a37 Since salt versioning changed, so should the depending deprecations.
The are some output parser options which should be triggering warnings salt 0.10.6 and should start triggering failures when 0.10.7 came out. Adapt these dependable deprecations to the new versioning convention.
2012-12-15 00:13:31 +00:00
Thomas S Hatch
aa1c55f610 Add tests for pillar matching list objects Fix #2761 2012-12-12 16:37:21 -07: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
6c22f65a56 test_issue_2731_masterless() should clean-up after. 2012-12-05 21:24:19 +00:00
Pedro Algarvio
957f9c61b7 Quiet down these tests a little bit. 2012-12-04 19:14:35 +00:00
Pedro Algarvio
2246bf3d33 Remove unused code. 2012-12-03 23:32:58 +00:00
Pedro Algarvio
bd930cddec Include a test case for #2731 2012-12-01 23:00:27 +00:00
Pedro Algarvio
c5fe83272f Even more open() to salt.utils.fopen(). 2012-11-18 18:57:10 +00:00
Pedro Algarvio
526ed994b8 Test for deprecation message first and then use the new --out format. 2012-11-17 17:39:06 +00:00
Pedro Algarvio
52b0c1ba8e Adapt cherry-picked 2dd188fa18abff3193450472af2192206907b3ba to the new output shell switch. 2012-11-16 18:01:01 +00:00
Pedro Algarvio
ee32784bb4 Make the salt-cp shell test case work across multiple machines. 2012-11-16 18:00:51 +00:00
Pedro Algarvio
c60e4dd645 Fix tests and "convert" text output to "txt" when choosing outputter. 2012-11-16 00:07:08 +00:00
Pedro Algarvio
e390bd92f4 Fix raw outputter test. 2012-11-15 00:03:31 +00:00
Pedro Algarvio
152088d727 Include another option into the test_salt_documentation_arguments_not_assumed test. 2012-11-11 20:11:08 +00:00
Pedro Algarvio
527cf4ee38 Don't assume again and expand test.
* When introducing the "Don't assume!" changes I also assumed that there were always more than one argument from the shell. Expanded the testcase to include this check.
2012-11-09 11:32:36 +00:00
Pedro Algarvio
75f70e49f3 Include a test case for the previous "Don't assume!" commit. 2012-11-09 11:23:30 +00:00
Pedro Algarvio
3de32be0c9 Fix integration.shell.call.CallTest.test_default_output(). 2012-11-04 10:29:07 +00:00
Pedro Algarvio
2053c03843 Fix key shell tests to match outputter changes. 2012-11-04 10:08:30 +00:00
Thomas S Hatch
7db30d090a Fix outputter bug introduced with changes to yaml 2012-10-30 14:41:47 -06:00
Thomas S Hatch
c8e79c9ac3 fix outputter test with changes to yaml outputter 2012-10-30 14:15:23 -06:00
Pedro Algarvio
19d07bbba5 Fix tests in integration.shell.call. 2012-10-30 17:16:06 +00:00
Pedro Algarvio
cfae86b744 Fix salt-key tests to comply with the new salt.key changes. 2012-10-30 17:09:50 +00:00
Thomas S Hatch
1fa5129b90 Fix tests wrt output updates 2012-10-24 22:55:18 -06:00
Pedro Algarvio
cec1cbd477 Fix test if there the host has multiple subnets. 2012-10-07 03:05:00 +01:00
Pedro Algarvio
7e816c291f Add shell ipcadr match test. 2012-10-06 01:29:24 +01:00
Pedro Algarvio
496906e413 Add exsel shell match test.
Although this commit does not exactly reference the problem see on #2167, it was added while working for that issue.
2012-10-05 07:56:23 +01:00
Pedro Algarvio
325902c169 Test to make sure we're outputting kwargs on the user.delete documentation. 2012-09-30 10:59:07 +01:00
Pedro Algarvio
8c6b96db59 Support -d on the salt binary. Fixes #1992. 2012-09-07 19:21:07 +01:00
Pedro Algarvio
0c830784f3 Merge pull request #1974 from s0undt3ch/issues/1964
Reduce requirements to generate keys.
2012-09-05 14:38:03 -07:00
Pedro Algarvio
6e9b2810ee Reduce requirements to generate keys.
The generation of keys does not involve all the checks required to accept/deny/list keys. This code change allows:
 * regular users to generate keys
 * `/etc/salt` and `/var/log/salt` not to exist or not to be readable by the current user

It also does not check for a running master. We have now lowered the requirements to run this script just for generating keys.
2012-09-05 22:31:12 +01:00
Pedro Algarvio
75f262c447 Fix ValueError on Py2.6 zero length field names are not supported 2012-09-05 12:11:16 +01:00
Pedro Algarvio
81ccd7c9a7 Remove un-used import. 2012-09-03 23:26:59 +01:00
Pedro Algarvio
e7a10cce98 Fix saltstack/salt#1948
* `SaltCPOptionParser` was not reading any configuration file. It should!
* Fixed the `salt-cp` test which was not testing anything, until now.
2012-09-03 23:24:08 +01:00
Thomas S Hatch
f25167802a fix test that broke because of output changes 2012-08-18 01:48:40 -06:00
Pedro Algarvio
e32faa4a28 Fix salt-call bug with default outputter.
* `salt-call` default outputter returned from `salt.output.get_printout()` was `None` and `None` isn't callable neither outputs anything useful. In this case, the fault Outputter  should be used.
* `get_printout()` also tested for `txt_out` which now is, in the cleaned up parsers, `text_out`. Fixed.
2012-08-13 07:10:42 +01:00
Pedro Algarvio
ac1ee79fa6 Cleanup the salt-run(salt.cli.SaltRun) binary parser.
Reused the timeout mix-in. All cli tools parsers also reuse the config mixin.
This commit finishes cleaning up the cli tool parsers.
2012-08-04 23:25:37 +01:00
Pedro Algarvio
261450e90f Cleanup the salt-call(salt.cli.SaltCall) binary parser.
Reused the logging and output mix-ins.
2012-08-04 23:07:39 +01:00
Pedro Algarvio
060f33a15a Cleanup the salt-key(salt.cli.SaltKey) binary parser.
Reused the output options and logging setup mix-ins.

Fixed a bug introduced in previous commit on `salt.utils.parsers.SaltCPOptionParser._mixin_after_parsed()`, function does not accept any arguments.
2012-08-04 22:55:15 +01:00
Pedro Algarvio
f5aad4f8e2 Cleanup the salt-cp(salt.cli.SaltCP) binary parser.
For this, the timeout mix-in and both the target and output parser group mix-ins were re-used. Way less code and logic to keep track of.
Added a simple test for this binary too.
2012-08-04 22:28:51 +01:00
Pedro Algarvio
b582e40ff1 Cleanup the salt(salt.cli.SaltCMD) binary parser.
* Created 2 mix-ins as option groups, the output options and the target options. This will allow adding some explanatory text besides separating these options from the parser's main options.
* All options on the parser, including the grouped options are now merged to the loaded configuration which will latter get passed on.
* Also created the timeout mix-in which will be used in other binaries.
2012-08-04 22:08:06 +01:00
Pedro Algarvio
d776705e49 Parsers(master, minion, syndic) cleanup code.
Moved the minion, master and syndic parsers to use mixins to clean up, reuse, and automate some of the required procedures.
2012-08-04 19:58:32 +01:00
Jeroen Dekkers
a28272e2fb Fix "undefined name" errors spotted by pyflakes 2012-07-15 03:01:35 +02:00
Intchanter
a1433ef5ec PEP8 fixes for tests 2012-06-30 14:10:34 -06:00
Thomas S Hatch
ef6b027e90 Fix salt key tests for new no_color option 2012-06-05 18:10:59 -06:00
Dan Colish
f5c8e242e4 Refactor runtests to allow dotted path module discovery.
In addition to traditional file system path test discovery it is
useful to run a test by stating it's dotted python path. For example,
this will only run the cmdmod integration tests from the
module suite::

        $ runtests.py -n tests.integration.modules.cmdmod
2012-05-29 19:56:47 -07:00
Baiju Muthukadan
24bb4ea4e0 Fix PEP8 warnings for test cases 2012-05-29 22:10:20 +05:30
Thomas S Hatch
d8ca98f3a4 Add test to make sure #1348 does not happen again 2012-05-27 17:41:49 -06:00
Jon McKenzie
c0f8e07bd7 Add --yaml-out, --json-out, and --raw-out outputters to salt-key CLI (retain color output as default) 2012-05-26 18:22:24 -04:00
Thomas S Hatch
8bfab4e7c0 pillar matcher test 2012-05-23 10:18:54 -06:00
Thomas S Hatch
757e8591dd Add test for compound matcher 2012-05-23 09:57:33 -06:00
Thomas S Hatch
b25e82c59f Add regex grain match tests 2012-05-23 09:39:10 -06:00
Thomas S Hatch
b5bdfc3073 Add grain matcher test 2012-05-23 08:46:12 -06:00
Thomas S Hatch
19baf0f577 Add initial matcher tests 2012-05-23 08:31:58 -06:00
Thomas S Hatch
b1c710e70a fix error with new minion in salt-key tests 2012-05-23 08:08:35 -06:00
Thomas S Hatch
dd6e2da941 Fix salt-key test for new minion 2012-05-23 08:05:47 -06:00
Baiju Muthukadan
cb5e3ea089 Add testrunner boilerplate code to run tests 2012-05-05 19:39:23 +05:30
Thomas S Hatch
e84d4e1101 Add soem comments to the runner tests 2012-04-21 18:11:24 -06:00
Thomas S Hatch
242d554441 Add initial tests for the salt-run command 2012-04-21 18:04:50 -06:00
Thomas S Hatch
8276c2548b Change name of clicase to shellcase 2012-04-21 17:51:41 -06:00
Thomas S Hatch
7530f39269 Add some more key tests 2012-04-21 17:47:04 -06:00
Thomas S Hatch
98027c3fb6 Add initial salt-key test 2012-04-21 17:31:46 -06:00