File: backend-key-value-test-conf.pl

package info (click to toggle)
libconfig-model-perl 2.155-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,172 kB
  • sloc: perl: 15,117; makefile: 19
file content (42 lines) | stat: -rw-r--r-- 946 bytes parent folder | download
1
2
3
4
5
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
32
33
34
35
36
37
38
39
40
41
42
# test inifile backend

use strict;
use warnings;

# create minimal model to test ini file backend.
my @config_classes = ({
    name => 'IniKeyValue',
    element => [
        [qw/package-status report-with/] => {
            qw/type leaf value_type uniline/,
        },
    ],
    rw_config => {
        backend     => 'IniFile',
        # specify where is the config file. this must match
        # the $conf_file_name and $conf_dir variable above
        assign_char => ':',
        assign_with => ' : ',
        config_dir  => '/etc/',
        file        => 'test.kv',
    },
});


# the test suite
my @tests = (
    {   # test complex parameters
        name  => 'bts-control',
    },
);

return {
    # specify where is the example file
    conf_file_name => 'test.kv',
    conf_dir => '/etc',

    # specify the name of the class to test
    model_to_test => "IniKeyValue",
    config_classes => \@config_classes,
    tests => \@tests
};