git.frostfs.info/TrueCloudLab/frostfs-sdk-go@v0.0.0-20241022124111-5361f0ecebd3/netmap/Tests.md (about) 1 ## Language-agnostic testing 2 `json_tests` sub-folder contains netmap selection algorithm tests in the following format: 3 4 ### File structure 5 Field|Description 6 ---|--- 7 `name`|Human readable name for a set of related tests operating on a single netmap. 8 `nodes`|List of `netmap.NodeInfo` structures coressponding to a nodes in the network. 9 `tests`|Map from a single test name to a `test` structure. 10 11 ### Single test structure 12 Field|Description 13 ---|--- 14 `policy`|JSON representation of a netmap policy. 15 `pivot`|Optional pivot to use in container node selection. 16 `result`|List of lists of node-indices corresponding to each replica in the placement policy. 17 `error`|Error that should be raised for this specific test. The actual strings are used in SDK, other implementation may simply check that error has occurred. 18 `placement`|Optional field containing another test for selecting placement nodes for an object. Can contain `pivot`, `result` and `error` fields with the same meaning as above. Note that if `pivot` is omitted, empty value should be used.