World defines an integration test world. It's used to run the actual Perkeep binaries (perkeepd, pk-put, pk-get, pk, etc) together in large tests, including building them, finding them, and wiring them up in an isolated way.
| 44 | // pk-put, pk-get, pk, etc) together in large tests, including |
| 45 | // building them, finding them, and wiring them up in an isolated way. |
| 46 | type World struct { |
| 47 | srcRoot string // typically $GOPATH[0]/src/perkeep.org or just the root dir where go.mod is |
| 48 | config string // server config file relative to pkg/test/testdata |
| 49 | tempDir string |
| 50 | gobin string // where the World installs and finds binaries |
| 51 | |
| 52 | addr string // "127.0.0.1:35" |
| 53 | |
| 54 | server *exec.Cmd |
| 55 | isRunning int32 // state of the perkeepd server. Access with sync/atomic only. |
| 56 | serverErr error |
| 57 | } |
| 58 | |
| 59 | // NewWorld returns a new test world. |
| 60 | // It uses the GOPATH (explicit or implicit) to find the "perkeep.org" root. |
nothing calls this directly
no outgoing calls
no test coverage detected