Defined Type: httpbb::test_suite

Defined in:
modules/httpbb/manifests/test_suite.pp

Overview

Defined type httpbb::test_suite

Resource for httpbb test suite YAML files, which are installed into the directory passed as $tests_dir to the httpbb class. That class must be declared before any httpbb::test_suite resources.

Parameters:

  • mode (Optional[String]) (defaults to: undef)
  • source (Optional[Stdlib::Filesource]) (defaults to: undef)
  • content (Optional[String]) (defaults to: undef)


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'modules/httpbb/manifests/test_suite.pp', line 6

define httpbb::test_suite(
    Optional[String] $mode = undef,
    Optional[Stdlib::Filesource] $source = undef,
    Optional[String] $content = undef,
){
    if !defined(Class['httpbb']) {
        fail('Declare the httpbb class before using httpbb::test_suite.')
    }

    if $source {
        file {"${::httpbb::tests_dir}/${title}":
            ensure => file,
            mode   => $mode,
            source => $source,
        }
    } elsif $content {
        file {"${::httpbb::tests_dir}/${title}":
            ensure  => file,
            mode    => $mode,
            content => $content,
        }
    } else {
        fail('Define either source or content.')
    }

}