pungi/tests
Qixiang Wan c93207addb checks: extend validator with 'alias'
When a property has 'alias' defined, and it's not present in instance,
if the alias property is present, add the property with value from alias
property before remove the alias property from instance.

Examples:

with schema:
{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "Pungi Configuration",
        "type": "object",
        "properties": {
            "release_name": {"type": "string", "alias": "product_name"},
        },
        "required": ["release_name"],
        "additionalProperties": False,
}

1. config = {"release_name": "dummy product"}:

   validate pass, config not changed after validation.

2. config = {"product_name": "dummy product"}:

   validate pass, config updated to the following after validation:

   config: {"release_name": "dummy product"}

3. config = {"name": "dummy product"}:

   validate fail, errror message is "Failed validation in : 'release_name' is a required property",
   and warning message is "WARNING: Unrecognized config option: name."

4. config = {"product_name": "dummy product", "release_name": "dummy product"}

   validate fail, error message is "Failed validation in : product_name is an alias of release_name, only one can be used."

Signed-off-by: Qixiang Wan <qwan@redhat.com>
2017-03-06 09:26:42 +08:00
..
data Refactor depsolving tests 2017-02-13 12:32:07 +01:00
fixtures Refactor depsolving tests 2017-02-13 12:32:07 +01:00
__init__.py Fix test data, improve Makefile. 2015-06-25 08:02:57 -04:00
helpers.py repoclosure: Add test for repoclosure in test phase 2017-01-26 13:27:48 +01:00
test_arch.py Remove executable permissions on test scripts 2016-10-25 10:42:16 +00:00
test_buildinstall.py Enable customizing runroot task weight 2017-02-23 12:44:27 +01:00
test_checks.py checks: extend validator with 'alias' 2017-03-06 09:26:42 +08:00
test_compose.py Create temporary dirs under compose's workdir 2017-01-11 15:25:47 +08:00
test_compose.sh Add script to generate unified ISOs 2017-01-04 10:22:20 +01:00
test_config.py repoclosure: add option to use dnf backend 2017-01-26 13:39:12 +01:00
test_config_validate_script.py Fix PhaseLoggerMixin in case of compose has _logger = None 2016-11-30 14:41:02 +08:00
test_createiso_phase.py Enable customizing runroot task weight 2017-02-23 12:44:27 +01:00
test_createiso_script.py Remove executable permissions on test scripts 2016-10-25 10:42:16 +00:00
test_createrepo_wrapper.py Remove executable permissions on test scripts 2016-10-25 10:42:16 +00:00
test_createrepophase.py createrepo: Add tests for adding product certificates 2016-11-23 11:17:04 +01:00
test_extra_files_phase.py extra-files: Nice error message on missing RPM 2016-11-10 09:38:50 +01:00
test_gather.py Refactor depsolving tests 2017-02-13 12:32:07 +01:00
test_imagebuildphase.py image-build: Pass arches around as a list 2017-01-24 08:50:21 +01:00
test_imagechecksumphase.py image_checksum: add file sizes to checksum files 2017-01-23 18:20:21 +08:00
test_initphase.py comps: Filter comps groups for optional variants 2017-02-23 12:44:20 +01:00
test_koji_wrapper.py koji_wrapper: Always use --profile option with koji 2017-01-30 13:00:25 +01:00
test_linker.py Remove executable permissions on test scripts 2016-10-25 10:42:16 +00:00
test_liveimagesphase.py config: Report unknown options as warnings 2016-12-13 11:58:08 +01:00
test_livemediaphase.py koji_wrapper: Always use --profile option with koji 2017-01-30 13:00:25 +01:00
test_lorax_wrapper.py lorax-wrapper: Put all log files into compose logs 2016-11-09 09:37:00 +01:00
test_media_split.py Include phase name in log for some phases 2016-11-23 16:47:22 +08:00
test_metadata.py extra-files: Write a metadata file enumerating extra files 2016-09-07 13:02:48 +02:00
test_notifier.py Remove executable permissions on test scripts 2016-10-25 10:42:16 +00:00
test_osbs_phase.py osbs: optionally check GPG signatures 2017-01-17 13:08:58 +08:00
test_ostree_installer_phase.py Enable customizing runroot task weight 2017-02-23 12:44:27 +01:00
test_ostree_phase.py Enable customizing runroot task weight 2017-02-23 12:44:27 +01:00
test_ostree_script.py [ostree-installer] Add 'installer' sub-command to pungi-make-ostree 2016-12-12 19:30:35 +08:00
test_pathmatch.py Remove executable permissions on test scripts 2016-10-25 10:42:16 +00:00
test_paths.py Add JSON Schema for configuration 2016-09-01 10:56:15 +02:00
test_phase_base.py Add common global settings for images 2016-04-18 18:11:29 +02:00
test_pkgset_pkgsets.py Remove executable permissions on test scripts 2016-10-25 10:42:16 +00:00
test_pkgset_source_koji.py Remove executable permissions on test scripts 2016-10-25 10:42:16 +00:00
test_repoclosure_wrapper.py repoclosure: Don't run build deps check 2017-01-30 10:16:03 +01:00
test_scm.py Remove executable permissions on test scripts 2016-10-25 10:42:16 +00:00
test_test_phase.py repoclosure: Don't run build deps check 2017-01-30 10:16:03 +01:00
test_unified_isos.py unified-iso: Create isos with debuginfo packages 2017-01-11 14:36:25 +01:00
test_util.py util: Add a utility for managing temporary files 2017-02-20 09:14:25 +01:00