blob: 5de4ff341750ffe514ae30b742a46c30fd0ff62f [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
Ray Milkey685e34d2016-09-01 12:01:09 -070017<scenario name="distributed-leader-elector-test"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070018 description="ONOS LeaderElector distributed primitive Test">
Ray Milkey685e34d2016-09-01 12:01:09 -070019 <group name="Distributed-Primitive-Leader">
Madan Jampani9e1a8c12016-06-27 11:19:10 -070020
Ray Milkey685e34d2016-09-01 12:01:09 -070021 <step name="Distributed-Primitive-Leader.Activate-Distributed-Primitives-App"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070022 exec="onos ${OCI} app activate org.onosproject.distributedprimitives"/>
23
Ray Milkey685e34d2016-09-01 12:01:09 -070024 <step name="Distributed-Primitive-Leader.Test-Initial-No-Leader" requires="Distributed-Primitive-Leader.Activate-Distributed-Primitives-App"
Madan Jampani145623d2016-07-22 14:55:57 -070025 exec="onos-cluster-execute-expect leader-test test-elector show foo --expect leader=none#candidates=none"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070026
Ray Milkey685e34d2016-09-01 12:01:09 -070027 <step name="Distributed-Primitive-Leader.Test-Leader-Run" requires="Distributed-Primitive-Leader.Test-Initial-No-Leader"
28 exec="onos-execute-expect ${OCI} leader-test test-elector run foo --expect leader=${OCI}#term=[0-9][0-9]*#candidates=${OCI}"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070029
Ray Milkey685e34d2016-09-01 12:01:09 -070030 <step name="Distributed-Primitive-Leader.Test-Leader-Withdraw" requires="Distributed-Primitive-Leader.Test-Leader-Run"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070031 exec="onos ${OCI} leader-test test-elector withdraw foo"/>
32
Ray Milkey685e34d2016-09-01 12:01:09 -070033 <step name="Distributed-Primitive-Leader.Test-No-Leader-After-Withdraw" requires="Distributed-Primitive-Leader.Test-Leader-Withdraw"
Madan Jampani145623d2016-07-22 14:55:57 -070034 exec="onos-cluster-execute-expect leader-test test-elector show foo --expect leader=none#candidates=none"/>
Madan Jampani9e1a8c12016-06-27 11:19:10 -070035
36 <!--Check with check logs-->
Ray Milkey685e34d2016-09-01 12:01:09 -070037 <step name="Distributed-Primitive-Leader.Check-Log-Exceptions" requires="Distributed-Primitive-Leader.Test-No-Leader-After-Withdraw"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070038 exec="onos-check-logs ${OCI}"/>
39
Ray Milkey685e34d2016-09-01 12:01:09 -070040 <step name="Distributed-Primitive-Leader.Teardown-Distributed-Primitives-Test-App" requires="Distributed-Primitive-Leader.Check-Log-Exceptions"
Madan Jampani9e1a8c12016-06-27 11:19:10 -070041 exec="onos ${OCI} app deactivate org.onosproject.distributedprimitives"/>
42 </group>
43</scenario>
44