HomePhorge

(PUP-2950) Fix: ensure that default layer is used when the user has not…
ef75f4c11a4cUnpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

(PUP-2950) Fix: ensure that default layer is used when the user has not provided a layer

Without this patch,

unless diagnostics.errors?
  @layering_config   = data['layers'] or default_layers
  @scheme_extensions = (data['extensions'] and
            data['extensions']['scheme_handlers'] or
            default_scheme_extensions)
else
  @layering_config = []
  @scheme_extensions = {}
end

This would have resulted in @layering_config not being assigned a value if no
layers was set. This is clearly not intented. This patch updates the behavior
so that @layering_config is assigned default_layers instead
(by changing or to ||)

This commit also adds test cases to verify that this case is caught. Adding the
test case also highlighted that the constant CONFIG_CATEGORIES_MISSING was
undefined, causing the test to fail. This commit also defines
CONFIG_CATEGORIES_MISSING

Details

Provenance
Rahul Gopinath <rahul@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU4ff3919f1fa7: Merge remote-tracking branch 'upstream/master' into puppet-4
Branches
Unknown
Tags
Unknown

Event Timeline

Rahul Gopinath <rahul@puppetlabs.com> committed rPUef75f4c11a4c: (PUP-2950) Fix: ensure that default layer is used when the user has not… (authored by Rahul Gopinath <rahul@puppetlabs.com>).Aug 6 2014, 12:41 AM