From f1edd2715a755573d7578839a3efe8473b79b5c5 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Tue, 6 Sep 2016 11:18:48 +0100 Subject: (MODULES-3737) validate_legacy: refactoring * validate_legacy now accepts undef values * update the TypeMismatch message to include the original validate function name * only notice, not warn, on newly allowed values * changed previous_validation to function_name to avoid confusion with the function of the same name * use deprecation() instead of warn(), when hitting a deprecated value * prepare the tests and function for MODULES-3735 * rewrite validate_legacy tests to use new rspec-puppet * move validate_re deprecation to puppet4 only * adapt validate_re_spec --- spec/fixtures/test/manifests/validate_legacy.pp | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 spec/fixtures/test/manifests/validate_legacy.pp (limited to 'spec/fixtures/test/manifests') diff --git a/spec/fixtures/test/manifests/validate_legacy.pp b/spec/fixtures/test/manifests/validate_legacy.pp deleted file mode 100644 index 706df88..0000000 --- a/spec/fixtures/test/manifests/validate_legacy.pp +++ /dev/null @@ -1,18 +0,0 @@ -# Class to test stdlib validate_legacy function - -class test::validate_legacy( - $type, - $prev_validation, - $value, - $previous_arg1, - $previous_arg2 = undef, - ) { - - if $previous_arg2 == undef { - validate_legacy( $type, $prev_validation, $value, $previous_arg1 ) - } else { - validate_legacy( $type, $prev_validation, $value, $previous_arg1, $previous_arg2 ) - } - notice("Success") - -} -- cgit v1.2.3