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