summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* filters/cib2pcscmd[resources]: drop op options "spam"Jan Pokorný2016-02-011-2/+2
| | | | | | Also reflect the changes in the tests. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/format: get rid of unreachable codeJan Pokorný2016-02-011-3/+4
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/ccs2needle_xslt: make test relocatableJan Pokorný2016-02-011-6/+3
| | | | | | | | Previously, it there was a hard-wired dependency making assumptions about the project vs tests file tree layout. This made tests fail when different layout was used. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: drop unused filesJan Pokorný2016-02-013-159/+0
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/filters/ccsflat2cibprelude: fix (now) deployed resource testsJan Pokorný2015-12-171-78/+148
| | | | | | | | | | | | | | | | | | | Note that there was a subtle, broken assumption behind how these tests should work, but this was masked thanks to the result from XSLT always being a standalone tree (not a set/forest) since the resources were previously undeployed (passively defined in <resources> of cluster.conf and not referenced from the active parts). After putting "activating" the resources by putting them under <service> stanza, the XSLT results were actually sets of element nodes and while only the first one was exposed externally, mysterious kabooms around RNG validation emerged. Proper fix is to rely on a single wrapping level of processing (following the same rules of root element transformations, notably this "single result tree only" one) that will make the result of the actual level of XSLT under test be wrapped with <clufter:snippet> that is then removed upon attachment to the parent level, which is OK even if such result contained more trees modulo the wrapping. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/_com: rewrite_root: propagate walk post-processingJan Pokorný2015-12-171-3/+7
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters~ccs2pcs: propagate "monitor" op for primitivesJan Pokorný2015-12-171-0/+5
| | | | | | | | | | | | | | For this monitor operation, either use the interval as designated in the original rgmanager agent (sticking with the most basic=lowest depth only), or use the default of 60 seconds (the same is automatically injected as a default by pcs). Resolves: <https://bugzilla.redhat.com/1272570>. Also adjust the (unit) tests respectively. Reported-by: Miroslav Lisik <mlisik@redhat.com> Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cib2pcscmd[resources]: handle clone/master explicitlyJan Pokorný2015-12-171-1/+2
| | | | | | | Explicit commands are definitely easier to grasp than, e.g., "--clone foo=bar" hidden at the tail of a "resource add" command. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cib2pcscmd[resources]: consider clone/master resourcesJan Pokorný2015-12-172-0/+13
| | | | | | | | | Resolves <https://bugzilla.redhat.com/1270740>. Also extend one of the unit tests to cover clone resource (borrowed from the reported issue). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/*: apply `highlight` syntax where suitableJan Pokorný2015-12-171-2/+2
| | | | | | Also reflect that in the unit test. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests[filters/ccs2needlexml]: exercise log. subsys conversionJan Pokorný2015-12-171-0/+31
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: move rewrite_root to the common base for testingJan Pokorný2015-12-172-16/+16
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccs2needlexml[logging_daemon]: convert also log. subsysJan Pokorný2015-12-171-1/+1
| | | | | | | | | | | | | | Based on tri-state whitelist denoting positive propagation: - 1:1 - 1:1 but emit a warning (the meaning was changing in time) - rename the subsys Opened questions: - should CMAN also be renamed to PCMK? Also fix affected (but not directly related) unit test. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cmd_wrap: revisit group/line wrap-filling algoJan Pokorný2015-12-171-2/+3
| | | | | | | | | | | | | Previous one was just splitting into lines within a single group (also, this was limited to at most one split! that in turn made it a pretty broken text wrapping). Now it is two-ways allowing also short-enough groups to be put on the same line, and as many line splits is made as necessary for a proper text wrapping. Also update the test counterparts (function run_check_cmd of run-check script succeeds again after quite a long time!). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cmd-wrap: deal better with commands specifics (pcs)Jan Pokorný2015-12-171-2/+4
| | | | | | Fairly unfinished, to be tweaked over time... Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* formats/command: fix issue 'a=b' coercing to "separated"Jan Pokorný2015-12-171-0/+10
| | | | | | Also add a unit test targeting this issue. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccsflat2cibprelude[SAPInstance]: "convert", finallyJan Pokorný2015-09-021-0/+32
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccsflat2cibprelude[SAPDatabase]: "convert", finallyJan Pokorný2015-09-021-0/+48
| | | | | | Also add the unit test(s). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: cosmetics/styleJan Pokorný2015-09-022-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccsflat2cibprelude[nfsclient]: forgotten RA conversionJan Pokorný2015-08-111-0/+78
| | | | | | | Also included are respective unit tests (that needed code adjustments and fixtures spanning several past commits). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: spin off TeardownFilterTestCase classJan Pokorný2015-08-111-4/+6
| | | | | | Likewise, this a "ground preparation" for upcoming new unit test. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/_common.py, import -> tests/_com, execfileJan Pokorný2015-08-112-3/+3
| | | | | | | Preparing ground for nested test and unittest not playing well with symlinked _common.py in such the respective nested directory. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/formats/command: avoid a needless warningJan Pokorný2015-08-111-2/+4
| | | | | | | > WARNING:clufter.formats.command:'command' format: not backed by > OrderedDict Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/simpleconfig2needlexml: implemented + unit testJan Pokorný2015-07-021-0/+50
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/simpleconfig-normalize: new filter + unit testJan Pokorný2015-07-021-0/+40
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* formats/simpleconfig: implement string->struct + testJan Pokorný2015-07-021-0/+6
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests/formats/simpleconfig: deserves a unit test, tooJan Pokorný2015-07-021-0/+71
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* formats/command: need to preserve quotation infoJan Pokorný2015-07-021-0/+5
| | | | | | | | | | ... otherwise original quotation is not preserved in, say, ccs2pcscmd(-flatiron) command due to command format usage in cmd-wrap filter (--noop=cmd-wrap would serve as a workaround before this fix). Also add a respective unit test. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cmd-wrap: fix a thinko + unit test as a guardJan Pokorný2015-07-021-0/+37
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: add predecessor's configs (previously in pacemaker.git)Jan Pokorný2015-07-026-0/+251
| | | | | | (mainly for posterity) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/*2pcscmd: use unified interface for filter defaultsJan Pokorný2015-06-191-2/+2
| | | | | | (also unit tests benefit from this) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccs-disable-rg: refactor into separate filterJan Pokorný2015-06-191-0/+28
| | | | | | Should be stand-alone for easier reusability in the future... Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccs-version-bump: refactor into separate filterJan Pokorný2015-06-191-0/+29
| | | | | | Should be stand-alone for easier reusability in the future... Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* commands/ccs2pcscmd-flatiron: introduce "guidance" ensuring sanityJan Pokorný2015-06-191-1/+2
| | | | | | | ... first check being that pcs commands after "auth" are run from actual intended cluster node. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* commands/ccs2pcscmd-flatiron: add "--start-wait" switchJan Pokorný2015-06-191-0/+1
| | | | | | Also adjust the test case. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* commands/ccs2pcscmd-flatiron: add "--enable" switchJan Pokorný2015-06-191-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cib2pcscmd: support for accumulate-and-push (default)Jan Pokorný2015-05-291-1/+1
| | | | | | | | | | | Configurable via pcscmd_tmpcib value in command/filter context, feature disabled when passing empty string. Uses "pcs -f tmp-cib.xml ..." (per pcscmd_tmpcib value, this filename is default) for various CIB manipulations, then it is pushed using "pcs cluster cib-push tmp-cib.xml --config". Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccspcmk2pcscmd: support for "pcs cluster auth" (default)Jan Pokorný2015-05-291-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cib2pcscmd: support for verbose output (default)Jan Pokorný2015-05-291-1/+1
| | | | | | | | Also: - turn off verbose output for the purpose of a unit test - normalize commas in string interpolations for the snippets Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccspcmk2pcscmd: support for verbose output (default)Jan Pokorný2015-05-291-2/+2
| | | | | | | | Also: - output a new-line (as appropriate) + reflect it in the unit test - turn off verbose output for the purpose of a unit test Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filter/cib2pcscmd[group]: s/pcs group/pcs resource group/Jan Pokorný2015-05-291-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/stringiter_combine: new stringiter_combine2 filterJan Pokorný2015-04-151-0/+36
| | | | | | | | | Think of this as 2-to-1 multiplexer (effectively just performing in-order concatenation of the two inputs). Also add a unit test. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cib2pcscmd: new filter incl. testJan Pokorný2015-04-152-0/+94
| | | | | | | This is for upcoming cluster.conf (Pacemaker) + CIB -> sequence of pcs commands conversion. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccspcmk2pcscmd: new filter incl. testJan Pokorný2015-04-152-0/+32
| | | | | | | This is for upcoming cluster.conf (Pacemaker) + CIB -> sequence of pcs commands conversion. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* refactor: pcs (not in command names) -> cibJan Pokorný2015-04-083-11/+11
| | | | | | "pcs" should be reserved for actual pcs CLI tool commands. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* facts: cmd_pkg_install: be ready to deal with a generatorJan Pokorný2015-02-261-1/+8
| | | | | | | Also add relevant unit tests. Reported-by: Patrik Hagara <phagara@redhat.com> Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* facts: cmd_pkg_install: return empty string when no pkgsJan Pokorný2015-02-261-1/+7
| | | | | | Also revamp respective unit tests. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* lib-general/formats/command: special "magic_split" flavorJan Pokorný2015-02-261-0/+15
| | | | | | | | | | | | ... that allows specifying multi-argument option as a single-argument one with '::' being a logical separator between such args. This is needed, for instance, when multi-argument option is specified last to differentiate between such option argument and proper command argument (only a single argument for an option is normally expected). Also add a respective unit test. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* lib-general/formats/command: fix "from dict" directionJan Pokorný2015-02-261-1/+8
| | | | | | Also fix a typo and add a relevant unit test. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: add "functional" test exercising filter/_try_editJan Pokorný2015-02-264-0/+78
| | | | | | Also extend .gitignore whitelist appropriately. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>