sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 1 | { |
| 2 | "environment":{ |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 3 | "cmdLine":"afrouter -config arouter_test.json -logLevel 1", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 4 | "protoFiles": [ |
| 5 | { |
William Kurkian | daa6bb2 | 2019-03-07 12:26:28 -0500 | [diff] [blame] | 6 | "importPath":"github.com/opencord/voltha-protos/go/", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 7 | "service":"VolthaService", |
| 8 | "package":"voltha" |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 9 | }, |
| 10 | { |
| 11 | "importPath":"github.com/opencord/voltha-go/protos/", |
| 12 | "service":"Configuration", |
| 13 | "package":"afrouter" |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 14 | } |
| 15 | ], |
| 16 | "imports": [ |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 17 | "github.com/golang/protobuf/ptypes/empty" |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 18 | ], |
| 19 | "protoDesc":"voltha.pb", |
| 20 | "protoSubst": [ |
| 21 | { |
| 22 | "from":"google.protobuf.Empty", |
| 23 | "to":"empty.Empty" |
| 24 | } |
| 25 | ], |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 26 | "clients": { |
| 27 | "imports": [ |
| 28 | "github.com/golang/protobuf/ptypes/empty", |
| 29 | "github.com/opencord/voltha-go/protos/openflow_13" |
| 30 | ], |
| 31 | "endpoints": [ |
| 32 | { |
| 33 | "name":"client", |
| 34 | "port":"5000" |
| 35 | }, |
| 36 | { |
| 37 | "name":"stats", |
| 38 | "port":"55554" |
| 39 | } |
| 40 | ] |
| 41 | }, |
| 42 | "servers": { |
| 43 | "imports": [ |
| 44 | "github.com/golang/protobuf/ptypes/empty", |
| 45 | "github.com/opencord/voltha-go/protos/openflow_13" |
| 46 | ], |
| 47 | "endpoints": [ |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 48 | { |
| 49 | "name":"core11", |
| 50 | "port":"5011" |
| 51 | }, |
| 52 | { |
| 53 | "name":"core12", |
| 54 | "port":"5012" |
| 55 | }, |
| 56 | { |
| 57 | "name":"core21", |
| 58 | "port":"5021" |
| 59 | }, |
| 60 | { |
| 61 | "name":"core22", |
| 62 | "port":"5022" |
| 63 | }, |
| 64 | { |
| 65 | "name":"core31", |
| 66 | "port":"5031" |
| 67 | }, |
| 68 | { |
| 69 | "name":"core32", |
| 70 | "port":"5032" |
| 71 | } |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 72 | ] |
| 73 | } |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 74 | }, |
| 75 | "tests":[ |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 76 | {{range $k,$v := .CrTests}} |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 77 | { |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 78 | "name":"Test CreateDevice", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 79 | "send": { |
| 80 | "client":"client", |
| 81 | "method":"CreateDevice", |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 82 | "param":"{Type:\"simulated_olt\"}", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 83 | "expect":"{Id:\"abcd1234{{$k}}\",Type:\"simulated_olt\"}", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 84 | "_meta":"" |
| 85 | }, |
| 86 | "servers": [ |
| 87 | { |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 88 | "name":"core{{$v.Core}}1", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 89 | "meta": [ |
| 90 | { |
| 91 | "key":"voltha_serial_number", |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 92 | "value":"{{$v.SerNo}}" |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 93 | } |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 94 | ] |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 95 | }, |
| 96 | { |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 97 | "name":"core{{$v.Core}}2", |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 98 | "meta": [ |
| 99 | { |
| 100 | "key":"voltha_serial_number", |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 101 | "value":"{{$v.SerNo}}" |
| 102 | } |
| 103 | ] |
| 104 | } |
| 105 | ] |
| 106 | }, |
| 107 | {{end}} |
| 108 | {{range $k,$v := .GetTests}} |
| 109 | { |
| 110 | "name":"Test EnableDevice", |
| 111 | "send": { |
| 112 | "client":"client", |
| 113 | "_method":"GetDevice", |
| 114 | "method":"EnableDevice", |
| 115 | "param":"{Id:\"abcd1234{{$k}}\"}", |
| 116 | "expect":"{}", |
| 117 | "_expect":"{Id:\"abcd1234{{$k}}\",Type:\"simulated_olt\"}", |
| 118 | "_meta":"" |
| 119 | }, |
| 120 | "servers": [ |
| 121 | { |
| 122 | "name":"core{{$v.Core}}1", |
| 123 | "meta": [ |
| 124 | { |
| 125 | "key":"voltha_serial_number", |
| 126 | "value":"{{$v.SerNo}}" |
| 127 | } |
| 128 | ] |
| 129 | }, |
| 130 | { |
| 131 | "name":"core{{$v.Core}}2", |
| 132 | "meta": [ |
| 133 | { |
| 134 | "key":"voltha_serial_number", |
| 135 | "value":"{{$v.SerNo}}" |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 136 | } |
| 137 | ] |
| 138 | } |
| 139 | ] |
| 140 | }, |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 141 | {{end}} |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 142 | { |
| 143 | "name":"Test GetDevice", |
| 144 | "send": { |
| 145 | "client":"client", |
| 146 | "method":"GetDevice", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 147 | "param":"{Id:\"abcd12340\"}", |
| 148 | "expect":"{Id:\"abcd12340\",Type:\"simulated_olt\"}", |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 149 | "_meta":"" |
| 150 | }, |
| 151 | "servers": [ |
| 152 | { |
| 153 | "name":"core11", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 154 | "meta": [ |
| 155 | { |
| 156 | "key":"voltha_serial_number", |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 157 | "value":"110000" |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 158 | } |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 159 | ] |
| 160 | }, |
| 161 | { |
| 162 | "name":"core12", |
| 163 | "meta": [ |
| 164 | { |
| 165 | "key":"voltha_serial_number", |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 166 | "value":"110000" |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 167 | } |
| 168 | ] |
| 169 | } |
| 170 | ] |
| 171 | }, |
| 172 | { |
| 173 | "name":"Test Subscribe", |
| 174 | "send": { |
| 175 | "client":"client", |
| 176 | "method":"Subscribe", |
| 177 | "param":"{OfagentId:\"Agent007\"}", |
| 178 | "meta": [ |
| 179 | { |
| 180 | "key":"voltha_backend_name", |
| 181 | "value":"" |
| 182 | } |
| 183 | ], |
| 184 | "expect":"{OfagentId:\"Agent007\",VolthaId:\"core11\"}", |
| 185 | "expectMeta": [ |
| 186 | { |
| 187 | "key":"voltha_backend_name", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 188 | "value":"vcore1" |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 189 | } |
| 190 | ] |
| 191 | }, |
| 192 | "servers": [ |
| 193 | { |
| 194 | "name":"core11", |
| 195 | "meta": [ |
| 196 | { |
| 197 | "key":"voltha_serial_number", |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 198 | "value":"110001" |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 199 | }, |
| 200 | { |
| 201 | "key":"voltha_backend_name", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 202 | "value":"" |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 203 | } |
| 204 | ] |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 205 | } |
| 206 | ] |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 207 | }, |
| 208 | { |
| 209 | "_COMMENT":"If this test case fails, there could be a goroutine leak", |
| 210 | "name":"Get goroutine count", |
| 211 | "send": { |
| 212 | "client":"stats", |
| 213 | "method":"GetGoroutineCount", |
| 214 | "param":"{}", |
| 215 | "meta": [ ], |
| 216 | "expect":"{Count:39}", |
| 217 | "expectMeta": [ ] |
| 218 | }, |
| 219 | "servers": [ ] |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 220 | } |
| 221 | ] |
| 222 | } |