Change naming and veriy test-scheduler function
[bottlenecks.git] / test-scheduler / server / test / test_case / logic / tc_logic_02.yaml
1 ##############################################################################
2 # Copyright (c) 2018 HUAWEI TECHNOLOGIES CO.,LTD and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 ---
11 # description: test conductor basic logic of switch
12 # switch will determine the next case to execute based
13 # on the "value", and "value" can be assigned by the
14 # previous step's output.
15 # The testcase below is an example.
16 # To referring the step's output, using ((x.y)).
17 # x is the id of the step,
18 # y is the output key of the step.
19
20 schema:
21   steps:
22     -
23       id: 1
24       name: choose_greet_type
25       type: test
26       service:
27         name: greet
28         interface: switch
29       action: start
30
31     -
32       id: 2
33       name: response_the_greet
34       type: test
35       service:
36         name: greet
37         interface: answer
38       action: start
39       args:
40         ping: ping_from_leo
41
42     -
43       id: 3
44       name: make_a_greet_2
45       type: test
46       service:
47         name: greet
48         interface: greet
49       action: start
50       args:
51         name: leo_@
52
53   flows:
54     -
55       name: main
56       orders:
57         -
58           type: normal
59           step: 1
60         -
61           type: switch
62           value: ((1.result))
63           cases:
64             A:
65               -
66                 type: normal
67                 step: 2
68             B:
69               -
70                 type: normal
71                 step: 3