Madan Jampani | 9e1a8c1 | 2016-06-27 11:19:10 -0700 | [diff] [blame] | 1 | <!-- |
| 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 consistent map test" |
| 18 | description="ONOS ConsistentMap distributed primitive Test"> |
| 19 | <group name="Distributed-Primitive-Map"> |
| 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-Map-Get" requires="^" |
| 28 | exec="onos-execute-expect ${OCI} map-test foo get a --expect null"/> |
| 29 | |
| 30 | <step name="Test-Map-Put" requires="^" |
| 31 | exec="onos-execute-expect ${OCI} map-test foo put a b --expect null"/> |
| 32 | |
| 33 | <step name="Test-Map-Updated-After-Put" requires="^" |
| 34 | exec="onos-execute-expect ${OCI} map-test foo get a --expect b"/> |
| 35 | |
| 36 | <step name="Test-Map-PutIfAbsent-When-Key-Present" requires="^" |
| 37 | exec="onos-execute-expect ${OCI} map-test foo putIfAbsent a c --expect b"/> |
| 38 | |
| 39 | <step name="Test-Map-PutIfAbsent-When-Key-Absent" requires="^" |
| 40 | exec="onos-execute-expect ${OCI} map-test foo putIfAbsent b c --expect null"/> |
| 41 | |
| 42 | <step name="Test-Map-Updated-After-PutIfAbsent" requires="^" |
| 43 | exec="onos-execute-expect ${OCI} map-test foo get b --expect c"/> |
| 44 | |
| 45 | <step name="Test-Map-Updated-After-PutAndGet" requires="^" |
| 46 | exec="onos-execute-expect ${OCI} map-test foo putAndGet b d --expect d"/> |
| 47 | |
| 48 | <step name="Test-Map-Replace-When-Key-Absent" requires="^" |
| 49 | exec="onos-execute-expect ${OCI} map-test foo replace c e --expect null"/> |
| 50 | |
| 51 | <step name="Test-Map-Replace-When-Key-Present" requires="^" |
| 52 | exec="onos-execute-expect ${OCI} map-test foo replace b e --expect d"/> |
| 53 | |
| 54 | <step name="Test-Map-Replace-When-Value-Does-Not-Match" requires="^" |
| 55 | exec="onos-execute-expect ${OCI} map-test foo replace b x f --expect false"/> |
| 56 | |
| 57 | <step name="Test-Map-Replace-When-Value-Does-Match" requires="^" |
| 58 | exec="onos-execute-expect ${OCI} map-test foo replace b e f --expect true"/> |
| 59 | |
| 60 | <step name="Test-Map-ContainsValue-False-Case" requires="^" |
| 61 | exec="onos-execute-expect ${OCI} map-test foo containsValue x --expect false"/> |
| 62 | |
| 63 | <step name="Test-Map-ContainsValue-True-Case" requires="^" |
| 64 | exec="onos-execute-expect ${OCI} map-test foo containsValue f --expect true"/> |
| 65 | |
| 66 | <step name="Test-Map-Size" requires="^" |
| 67 | exec="onos-execute-expect ${OCI} map-test foo size --expect 2"/> |
| 68 | |
| 69 | <step name="Test-Map-IsEmpty" requires="^" |
| 70 | exec="onos-execute-expect ${OCI} map-test foo isEmpty --expect false"/> |
| 71 | |
| 72 | <step name="Test-Map-Remove" requires="^" |
| 73 | exec="onos-execute-expect ${OCI} map-test foo remove b --expect f"/> |
| 74 | |
| 75 | <step name="Test-Map-Remove-Key-Value-Does-Not-Match" requires="^" |
| 76 | exec="onos-execute-expect ${OCI} map-test foo remove a c --expect false"/> |
| 77 | |
| 78 | <step name="Test-Map-Remove-Key-Value-Does-Match" requires="^" |
| 79 | exec="onos-execute-expect ${OCI} map-test foo remove a b --expect true"/> |
| 80 | |
| 81 | <step name="Test-Map-Clear" requires="^" |
| 82 | exec="onos ${OCI} map-test foo clear"/> |
| 83 | |
| 84 | <step name="Test-Map-Cleared" requires="^" |
| 85 | exec="onos-execute-expect ${OCI} map-test foo isEmpty --expect true"/> |
| 86 | |
| 87 | <!--Check with check logs--> |
| 88 | <step name="Check-Log-Exceptions" requires="^" |
| 89 | exec="onos-check-logs ${OCI}"/> |
| 90 | |
| 91 | <step name="Teardown-Distributed-Primitives-Test-App" requires="^" |
| 92 | exec="onos ${OCI} app deactivate org.onosproject.distributedprimitives"/> |
| 93 | </group> |
| 94 | </scenario> |
| 95 | |