In api/feeder_test.go, we have three main test case scenarios:
- To test if a unique hash is generated for each new document
- Testing if payload sent to the /api/feeder endpoint returns document content as expected
- Test to ensure the indexing of documents is working as expected
The following is the expected output after running the tests:
$ go test -v ./... ? github.com/last-ent/distributed-go/chapter6/goophr/concierge [no test files] === RUN TestGetTitleHash === RUN TestGetTitleHash/Different_Titles === RUN TestGetTitleHash/Duplicate_Titles === RUN TestGetTitleHash/Same_hashes --- PASS: TestGetTitleHash (0.00s) --- PASS: TestGetTitleHash/Different_Titles (0.00s) --- PASS: TestGetTitleHash/Duplicate_Titles (0.00s) ...