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