summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: avoid loading ext. plugins (complain about imports)Jan Pokorný2015-02-262-2/+3
| | | | | | Highlighted by increased "cannot load a module" msg severity. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* formats/command: move to ext-plugins/lib-general/formatsJan Pokorný2015-01-091-1/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* ext-plugins/lib-general: string_{list,set} + conversion filterJan Pokorný2015-01-091-0/+31
| | | | | | | + start respective unit tests + fix faulty format passing logic as observed with the new plugins Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* facts: add ability to translate logical cmd to distro cmdJan Pokorný2015-01-091-1/+17
| | | | | | | | | | | | The target distro cmd is expected to keep the assumed template form (say, a command to install packages should contain "{commands}" field that is then substituted, via "format" method, with the desired packages, completing the command to be used further in the process). Unlike with logical packages, nothing is considered a (suitable) distro-wide default. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* facts: add ability to translate logical pkg to distro pkgJan Pokorný2015-01-091-1/+16
| | | | | | | | In particular distro counterpart is found, logical package name is used (possibility for false assumptions, but makes enough sense to keep it like it to avoid being to verbose in the facts base) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Rename utils_cluster -> facts (more generic, really)Jan Pokorný2015-01-091-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* formats/command: parsing/linearizing a command + testsJan Pokorný2014-11-142-0/+53
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/utils: assertEquals (deprecated) -> assertEqualJan Pokorný2014-11-141-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/_gone -> _gone: same lines even for singly nested testsJan Pokorný2014-11-1411-21/+11
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/utils_cluster: add test_cluster_pcs_1_2Jan Pokorný2014-11-141-15/+31
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* ccs2pcs: big renaming (ccsflat2pcsprelude + pcsprelude2pcs)Jan Pokorný2014-10-212-6/+6
| | | | | | | | | Also make distinguishing more restricted internal variants of the formats more explicit (ccsflat, pcsprelude) -- this is known to cause a little regression (format checking too strict to cope with this) and the fix for that is forthcoming. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: fix a chained typoJan Pokorný2014-10-212-3/+3
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: fix an issue with passing dict instead of "opt" objJan Pokorný2014-10-082-1/+11
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_cluster: update knowledge about cluster in Fedora/UbuntuJan Pokorný2014-09-291-0/+5
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/utils_cluster: exercise cluster_pcs_flatiron predicateJan Pokorný2014-09-291-0/+29
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/utils_xml: drop unused importJan Pokorný2014-09-221-1/+0
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: add __init__.py to allow custom test pickingJan Pokorný2014-09-221-0/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Adjust a way to operate in "development" mode wrt. run-devJan Pokorný2014-09-2217-28/+27
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccs2ccsflat+ccs_flatten: nothing to do -> return orig. dumpJan Pokorný2014-09-221-4/+7
| | | | | | | | | | This way, we do not have to bother with stdin and/or magic file descriptors. At the cons' side, the equality check is little bit complicated with a need to normalize both before-after variants, but this only affects tests anyway (that are accommodating this change as of now). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Make run-dev central point for local use (e.g., test run)Jan Pokorný2014-09-221-50/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Allow for convenient interactive/exploratory useJan Pokorný2014-09-171-2/+8
| | | | | | + mention it in doc/HACKING (Interactive/exploratory use: IPython...) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/_bootstrap: fix a thinko preventing debug outputsJan Pokorný2014-09-171-1/+1
| | | | | | | | ... these are expected by default if LOGLEVEL not specified Also, instruct .travis.yml for this level of verbosity. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/format: fix issue discovered by Travis CIJan Pokorný2014-09-171-1/+1
| | | | | | | Previously masked by accidental formats/coro.pyc leftover. (This is exactly what CI is good for). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Get rid of remaining clufter-qualified commandsJan Pokorný2014-09-0916-122/+174
| | | | | | (less name binding in favor of implied relations, the better) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/command: apply Approved Formatting Convention (TM)Jan Pokorný2014-09-051-6/+6
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: 'implicit' superseded (by far) with 'init_lookup'Jan Pokorný2014-09-052-3/+7
| | | | | | + reflect that in tests Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* plugin_registry: unify passing of look-aside pluginsJan Pokorný2014-09-051-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Reconsider plugin (class/symbol) to module organizationJan Pokorný2014-09-054-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparation work for being able to pick up plugin of choice nicely without the necessity of scanning the whole name/path space followed with some initialization routines across all plugins even if they won't be used for sure. Such heavy-weight approach is fine for using clufter as CLI tool (covering potentially any available use-case), not so much for the use as a library with presumably a priori determined task to perform. As generally one module can (and often is practical!) contain several modules, we are introducing following convention to allow our proposed filtering to have a good false-positives/convenience ratio: module shall contain only plugins the name of which contains the same prefix as the module's filename does, where the prefix is assumed the part before first occurrence of '_' ('-' for stringified/decorated plugin names) As a concrete example, formats/ccs.py module contains ccs and ccs_flat plugins, hence when ccs_flat is to be picked with this fine granularity and using default search path, only formats/ccs.py file will match the prefix test and hence only ccs and ccs_flat will be prepared for further use (one false positive in this case is a result of the mentioned trade-off). This commit normalizes the plugin-module allocation to follow the convention, reflects these changes in tests, etc. and adds a note to the HACKING doc file. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Solve a "read-only dict as API" question once foreverJan Pokorný2014-09-041-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* format: fix multiple class-level __init__ per one __new__ resultJan Pokorný2014-09-031-10/+16
| | | | | | | + modify tests/run_cmd to trigger such a case Reported-by: Tomáš Jelínek" <tojelinek@redhat.com> Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filter{,_manager}: filter responsible for resolving selfJan Pokorný2014-09-024-14/+16
| | | | | | ... against the passed formats Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command{,_manager}: command responsible for resolving selfJan Pokorný2014-09-021-24/+16
| | | | | | | | | ... against the passed filters; The convention is that when the Command{,Alias} cannot be resolved successfully, None object is returned from constructing the object. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/run_cmd: remove hit-disk test in favor of in-memory oneJan Pokorný2014-09-011-24/+24
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command: make usable as a library (output as a string, etc.)Jan Pokorný2014-09-011-0/+18
| | | | | | New unit test included. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/run_cmd: create test files in tests dirJan Pokorný2014-08-291-4/+6
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/run_cmd: make standalone script (for consistency)Jan Pokorný2014-08-291-0/+4
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/run_cmd: drop (redundant) logging snippetsJan Pokorný2014-08-291-3/+0
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/run_cmd: new (sanity) test of running a command directlyJan Pokorný2014-08-271-0/+42
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main + tests/command_manager: cleanup/cosmeticsJan Pokorný2014-08-261-2/+0
| | | | | | Mainly a follow-up of commit b23cc121c3d7866dea8b559e08142d1dc229fb9e. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: add `implicit` as a shortcut constructorJan Pokorný2014-08-261-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/command_context: check proper "notaint" + "anabasis"Jan Pokorný2014-06-191-0/+61
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command/format: pass declared cmd context subset to Format objectJan Pokorný2014-06-181-3/+2
| | | | | | | | | | | | | | This subset is declared with 'context_specs' and is being built on the metaclass level in the top-down, extending (additive/non-subtractive) manner (just like the set of methods is growing monotonously top-down the hierarchy). Currently, only 'validator_specs' (mapping protocols to the somewhat abstract "validator spec", '' key being used as a failback) is of interest this way, and can be used as an on-off validation toggle on user's request (by convence, '' value stands for off state). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* format: etree_rng_validator: extend + more info to call siteJan Pokorný2014-06-171-4/+5
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* xml_utils: make rng_pivot return "starting" definitionJan Pokorný2014-06-131-3/+3
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils: fix braino in func_defaults_varnames + update unittestJan Pokorný2014-06-041-1/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: check validation harness using now fixed corosync.rngJan Pokorný2014-05-303-30/+284
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_xml: XML helpers incl. rng_pivot to be used for validationJan Pokorný2014-05-283-0/+2275
| | | | | | + unittest Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_prog: new func dirname_x (iterated dirname)Jan Pokorný2014-05-281-2/+3
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_cib: unit for CIB-related stuff + test counterpartJan Pokorný2014-05-221-0/+24
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Relicence GPLv2 -> GPLv2+Jan Pokorný2014-04-2511-11/+11
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>