| <!-- |
| ~ 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 value test" |
| description="ONOS AtomicValue 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-Value-Initial-Value" requires="^" |
| exec="onos-execute-expect ${OCI} value-test test-value get --expect null"/> |
| |
| <step name="Test-Value-Set" requires="^" |
| exec="onos ${OCI} value-test test-value set v0"/> |
| |
| <step name="Test-Value-Get" requires="^" |
| exec="onos-execute-expect ${OCI} value-test test-value get --expect v0"/> |
| |
| <step name="Test-Value-CompareAndSet-False" requires="^" |
| exec="onos-execute-expect ${OCI} value-test test-value compareAndSet v1 v2 --expect false"/> |
| |
| <step name="Test-Value-Not-Updated-After-CAS" requires="^" |
| exec="onos-execute-expect ${OCI} value-test test-value get --expect v0"/> |
| |
| <step name="Test-Value-CompareAndSet-True" requires="^" |
| exec="onos-execute-expect ${OCI} value-test test-value compareAndSet v0 v1 --expect true"/> |
| |
| <step name="Test-Value-Updated-After-CAS" requires="^" |
| exec="onos-execute-expect ${OCI} value-test test-value get --expect v1"/> |
| |
| <!--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> |
| |