blob: ec774afa3700fd19b670529298d39a3d38e0354a [file] [log] [blame]
<!--
~ Copyright 2016-present Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<scenario name="distributed leader elector test"
description="ONOS LeaderElector distributed primitive Test">
<group name="Distributed-Primitive-Value">
<!--<import file="${ONOS_SCENARIOS}/setup.xml"/>
<dependency name="Setup" requires="Prerequisites"/>-->
<step name="Activate-Distributed-Primitives-App"
exec="onos ${OCI} app activate org.onosproject.distributedprimitives"/>
<step name="Test-Initial-No-Leader" requires="^"
exec="onos-execute-expect ${OCI} leader-test test-elector show foo --expect leader=none#candidates=none"/>
<step name="Test-Leader-Run" requires="^"
exec="onos-execute-expect ${OCI} leader-test test-elector run foo --expect leader=${OCI}#term=1#candidates=${OCI}"/>
<step name="Test-Leader-Withdraw" requires="^"
exec="onos ${OCI} leader-test test-elector withdraw foo"/>
<step name="Test-No-Leader-After-Withdraw" requires="^"
exec="onos-execute-expect ${OCI} leader-test test-elector show foo --expect leader=none#candidates=none"/>
<!--Check with check logs-->
<step name="Check-Log-Exceptions" requires="^"
exec="onos-check-logs ${OCI}"/>
<step name="Teardown-Distributed-Primitives-Test-App" requires="^"
exec="onos ${OCI} app deactivate org.onosproject.distributedprimitives"/>
</group>
</scenario>