4
%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
6
%% The contents of this file are subject to the Erlang Public License,
7
%% Version 1.1, (the "License"); you may not use this file except in
8
%% compliance with the License. You should have received a copy of the
9
%% Erlang Public License along with this software. If not, it can be
10
%% retrieved online at http://www.erlang.org/.
12
%% Software distributed under the License is distributed on an "AS IS"
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
%% the License for the specific language governing rights and limitations
20
%%%------------------------------------------------------------------
21
%%% Test Server self test.
22
%%%------------------------------------------------------------------
23
-module(test_server_conf01_SUITE).
24
-include_lib("test_server/include/test_server.hrl").
28
all(doc) -> ["Test simple conf case structure, with and without nested cases"];
31
{conf, conf1_init, [conf1_tc1, conf1_tc2], conf1_end},
33
{conf, [], conf2_init, [conf2_tc1, conf2_tc2], conf2_end},
35
{conf, conf3_init, [conf3_tc1,
37
{conf, [], conf4_init, [conf4_tc1, conf4_tc2], conf4_end},
39
conf3_tc2], conf3_end},
44
%%---------- conf cases ----------
46
conf1_init(Config) when is_list(Config) ->
51
conf2_init(Config) when is_list(Config) ->
56
conf3_init(Config) when is_list(Config) ->
61
conf4_init(Config) when is_list(Config) ->
66
conf5_init(Config) when is_list(Config) ->
71
conf6_init(Config) when is_list(Config) ->
77
conf5(suite) -> % test specification
78
[{conf, conf5_init, [conf5_tc1,
80
{conf, [], conf6_init, [conf6_tc1, conf6_tc2], conf6_end},
82
conf5_tc2], conf5_end}].
85
%%---------- test cases ----------
87
conf1_tc1(Config) when is_list(Config) ->
88
case ?config(data_dir,Config) of
89
undefined -> exit(no_data_dir);
92
conf1 = ?config(cc1,Config),
94
conf1_tc2(Config) when is_list(Config) ->
95
case ?config(priv_dir,Config) of
96
undefined -> exit(no_priv_dir);
99
conf1 = ?config(cc1,Config),
102
conf2_tc1(Config) when is_list(Config) ->
103
undefined = ?config(cc1,Config),
104
case ?config(data_dir,Config) of
105
undefined -> exit(no_data_dir);
108
conf2 = ?config(cc2,Config),
110
conf2_tc2(Config) when is_list(Config) ->
111
case ?config(priv_dir,Config) of
112
undefined -> exit(no_priv_dir);
115
conf2 = ?config(cc2,Config),
118
conf3_tc1(Config) when is_list(Config) ->
119
undefined = ?config(cc1,Config),
120
undefined = ?config(cc2,Config),
121
conf3 = ?config(cc3,Config),
123
conf3_tc2(Config) when is_list(Config) ->
124
conf3 = ?config(cc3,Config),
125
undefined = ?config(cc4,Config),
128
conf4_tc1(Config) when is_list(Config) ->
129
case ?config(data_dir,Config) of
130
undefined -> exit(no_data_dir);
133
undefined = ?config(cc1,Config),
134
undefined = ?config(cc2,Config),
135
conf3 = ?config(cc3,Config),
136
conf4 = ?config(cc4,Config),
138
conf4_tc2(Config) when is_list(Config) ->
139
case ?config(priv_dir,Config) of
140
undefined -> exit(no_priv_dir);
143
conf3 = ?config(cc3,Config),
144
conf4 = ?config(cc4,Config),
147
conf5_tc1(Config) when is_list(Config) ->
148
case ?config(data_dir,Config) of
149
undefined -> exit(no_data_dir);
152
undefined = ?config(cc1,Config),
153
undefined = ?config(cc2,Config),
154
undefined = ?config(cc3,Config),
155
undefined = ?config(cc4,Config),
156
conf5 = ?config(cc5,Config),
158
conf5_tc2(Config) when is_list(Config) ->
159
case ?config(priv_dir,Config) of
160
undefined -> exit(no_priv_dir);
163
conf5 = ?config(cc5,Config),
164
undefined = ?config(cc6,Config),
167
conf6_tc1(Config) when is_list(Config) ->
168
case ?config(data_dir,Config) of
169
undefined -> exit(no_data_dir);
172
undefined = ?config(cc1,Config),
173
undefined = ?config(cc2,Config),
174
undefined = ?config(cc3,Config),
175
undefined = ?config(cc4,Config),
176
conf5 = ?config(cc5,Config),
177
conf6 = ?config(cc6,Config),
179
conf6_tc2(Config) when is_list(Config) ->
180
case ?config(priv_dir,Config) of
181
undefined -> exit(no_priv_dir);
184
conf5 = ?config(cc5,Config),
185
conf6 = ?config(cc6,Config),