blob: 31737212fcb0a9f65b3f91693e3d421155ebe408 [file] [log] [blame]
Madan Jampani9e1a8c12016-06-27 11:19:10 -07001<!--
2 ~ Copyright 2016-present Open Networking Laboratory
3 ~
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
7 ~
8 ~ http://www.apache.org/licenses/LICENSE-2.0
9 ~
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
15-->
16
17<scenario name="distributed leader elector test"
18 description="ONOS LeaderElector distributed primitive Test">
19 <group name="Distributed-Primitive-Value">
20
21 <!--<import file="${ONOS_SCENARIOS}/setup.xml"/>
22 <dependency name="Setup" requires="Prerequisites"/>-->
23
24 <step name="Activate-Distributed-Primitives-App"
25 exec="onos ${OCI} app activate org.onosproject.distributedprimitives"/>
26
27 <step name="Test-Initial-No-Leader" requires="^"
Madan Jampani145623d2016-07-22 14:55:57 -070028 exec="onos-cluster-execute-expect leader-test test-elector show foo --expect leader=none#candidates=none"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070029
30 <step name="Test-Leader-Run" requires="^"
31 exec="onos-execute-expect ${OCI} leader-test test-elector run foo --expect leader=${OCI}#term=1#candidates=${OCI}"/>
32
33 <step name="Test-Leader-Withdraw" requires="^"
34 exec="onos ${OCI} leader-test test-elector withdraw foo"/>
35
36 <step name="Test-No-Leader-After-Withdraw" requires="^"
Madan Jampani145623d2016-07-22 14:55:57 -070037 exec="onos-cluster-execute-expect leader-test test-elector show foo --expect leader=none#candidates=none"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070038
39 <!--Check with check logs-->
40 <step name="Check-Log-Exceptions" requires="^"
41 exec="onos-check-logs ${OCI}"/>
42
43 <step name="Teardown-Distributed-Primitives-Test-App" requires="^"
44 exec="onos ${OCI} app deactivate org.onosproject.distributedprimitives"/>
45 </group>
46</scenario>
47