()
| 1231 | |
| 1232 | #[test] |
| 1233 | fn build_sandbox_notes_with_forwards() { |
| 1234 | let forwards = vec![ |
| 1235 | ForwardInfo { |
| 1236 | sandbox_name: "mybox".to_string(), |
| 1237 | port: 8080, |
| 1238 | pid: 123, |
| 1239 | validated_alive: true, |
| 1240 | bind_addr: "127.0.0.1".to_string(), |
| 1241 | }, |
| 1242 | ForwardInfo { |
| 1243 | sandbox_name: "mybox".to_string(), |
| 1244 | port: 3000, |
| 1245 | pid: 456, |
| 1246 | validated_alive: true, |
| 1247 | bind_addr: "127.0.0.1".to_string(), |
| 1248 | }, |
| 1249 | ForwardInfo { |
| 1250 | sandbox_name: "other".to_string(), |
| 1251 | port: 9090, |
| 1252 | pid: 789, |
| 1253 | validated_alive: true, |
| 1254 | bind_addr: "0.0.0.0".to_string(), |
| 1255 | }, |
| 1256 | ]; |
| 1257 | assert_eq!(build_sandbox_notes("mybox", &forwards), "fwd:8080,3000"); |
| 1258 | assert_eq!(build_sandbox_notes("other", &forwards), "fwd:9090"); |
| 1259 | assert_eq!(build_sandbox_notes("missing", &forwards), ""); |
| 1260 | } |
| 1261 | |
| 1262 | #[test] |
| 1263 | fn build_sandbox_notes_dead_forwards_excluded() { |
nothing calls this directly
no outgoing calls
no test coverage detected