From 1b73a66fc67af0e33fa41aacf50654d4a7a4903c Mon Sep 17 00:00:00 2001 From: Ken Barber Date: Fri, 5 Aug 2011 08:46:38 +0100 Subject: * Moved kwalify to puppetlabs-kwalify project * Re-arranged tests in line with puppetlabs-stdlib --- examples/kwalify-1.pp | 9 --------- examples/kwalify-2.pp | 24 ----------------------- examples/validate_resource-1.pp | 23 ---------------------- examples/validate_resource-1.schema | 39 ------------------------------------- examples/validate_resource-2.pp | 17 ---------------- examples/validate_resource-2.schema | 26 ------------------------- 6 files changed, 138 deletions(-) delete mode 100644 examples/kwalify-1.pp delete mode 100644 examples/kwalify-2.pp delete mode 100644 examples/validate_resource-1.pp delete mode 100644 examples/validate_resource-1.schema delete mode 100644 examples/validate_resource-2.pp delete mode 100644 examples/validate_resource-2.schema (limited to 'examples') diff --git a/examples/kwalify-1.pp b/examples/kwalify-1.pp deleted file mode 100644 index 852e46c..0000000 --- a/examples/kwalify-1.pp +++ /dev/null @@ -1,9 +0,0 @@ -$schema = { - 'type' => 'seq', - 'sequence' => [ - { 'type' => 'str', 'enum' => ['asdf','fdsa'] } - ] -} -$document = ['a', 'b', 'c'] - -kwalify($schema, $document) diff --git a/examples/kwalify-2.pp b/examples/kwalify-2.pp deleted file mode 100644 index 3f4ec33..0000000 --- a/examples/kwalify-2.pp +++ /dev/null @@ -1,24 +0,0 @@ -$schema = { - 'type' => 'map', - 'mapping' => { - 'name' => { - 'type' => 'str', - 'required' => true, - }, - 'email' => { - 'type' => 'str', - 'pattern' => '/@/', - }, - 'age' => { - 'type' => 'str', - 'pattern' => '/^\d+$/', - }, - } -} -$document = { - 'name' => 'foo', - 'email' => 'foo@mail.com', - 'age' => 20, -} - -kwalify($schema, $document) diff --git a/examples/validate_resource-1.pp b/examples/validate_resource-1.pp deleted file mode 100644 index c701b8d..0000000 --- a/examples/validate_resource-1.pp +++ /dev/null @@ -1,23 +0,0 @@ -define fooresource( - $color, - $type, - $somenumber, - $map - ) { - - validate_resource() - - # ... do something ... - -} - -fooresource { "example1": - color => "blue", - type => "circle", - somenumber => 5, - map => { - a => 1, - b => 2, - c => 3, - } -} diff --git a/examples/validate_resource-1.schema b/examples/validate_resource-1.schema deleted file mode 100644 index c540db5..0000000 --- a/examples/validate_resource-1.schema +++ /dev/null @@ -1,39 +0,0 @@ -type: map -mapping: - "title": - type: str - required: yes - "name": - type: str - required: yes - "caller_module_name": - type: str - required: yes - "module_name": - type: str - required: yes - "color": - type: str - required: yes - "type": - type: str - required: yes - "somenumber": - type: str - required: yes - pattern: /^\d+$/ - "map": - type: map - mapping: - "a": - type: str - required: yes - pattern: /^\d+$/ - "b": - type: str - required: yes - pattern: /^\d+$/ - "c": - type: str - required: yes - pattern: /^\d+$/ diff --git a/examples/validate_resource-2.pp b/examples/validate_resource-2.pp deleted file mode 100644 index b53b109..0000000 --- a/examples/validate_resource-2.pp +++ /dev/null @@ -1,17 +0,0 @@ -class foo ( - $a, - $b, - $c - ) { - - validate_resource() - - # ... do something ... - -} - -class { "foo": - a => "1", - b => "foobaz", - c => ['a','b','c'] -} diff --git a/examples/validate_resource-2.schema b/examples/validate_resource-2.schema deleted file mode 100644 index b516945..0000000 --- a/examples/validate_resource-2.schema +++ /dev/null @@ -1,26 +0,0 @@ -type: map -mapping: - "title": - type: str - required: yes - "name": - type: str - required: yes - "caller_module_name": - type: str - required: yes - "module_name": - type: str - required: yes - "a": - type: str - required: yes - "b": - type: str - required: yes - pattern: /^foo/ - "c": - type: seq - required: yes - sequence: - - type: str -- cgit v1.2.3