42minutes / go-42minutes

Manage your TV series - Scan existing, find and download new and missing episodes.
7 stars 2 forks source link

Add rethinkdb persisted user library #8

Closed geoah closed 8 years ago

geoah commented 8 years ago

Changelog

Adds a rethinkdb persisted UserLibrary that implements Library and resolves #4. Adds a docker compose for tests

Notes

The following methods could probably be removed both from the Library interface and the two implementations - @superdecimal what do you think?

Tests for all methods' successes are there and pass as expected. Still need to add more tests for failures, but this should do for now.

And since we don't yet have ci...

✗ go test . -v
=== RUN   TestUserLibrarySuite
=== RUN   TestUserLibrary_GetEpisodeByNumber_Success
--- PASS: TestUserLibrary_GetEpisodeByNumber_Success (0.37s)
=== RUN   TestUserLibrary_GetEpisode_Success
--- PASS: TestUserLibrary_GetEpisode_Success (0.30s)
=== RUN   TestUserLibrary_GetEpisodesBySeasonNumber_Success
--- PASS: TestUserLibrary_GetEpisodesBySeasonNumber_Success (0.30s)
=== RUN   TestUserLibrary_GetEpisodesBySeason_Success
--- PASS: TestUserLibrary_GetEpisodesBySeason_Success (0.06s)
=== RUN   TestUserLibrary_GetSeasonByNumber_Success
--- PASS: TestUserLibrary_GetSeasonByNumber_Success (0.35s)
=== RUN   TestUserLibrary_GetSeason_Success
--- PASS: TestUserLibrary_GetSeason_Success (0.53s)
=== RUN   TestUserLibrary_GetSeasonsByShow_Success
--- PASS: TestUserLibrary_GetSeasonsByShow_Success (0.38s)
=== RUN   TestUserLibrary_GetShow_Success
--- PASS: TestUserLibrary_GetShow_Success (0.20s)
=== RUN   TestUserLibrary_GetShows_Success
--- PASS: TestUserLibrary_GetShows_Success (0.17s)
=== RUN   TestUserLibrary_QueryShowsByTitle_Success
--- PASS: TestUserLibrary_QueryShowsByTitle_Success (0.20s)
=== RUN   TestUserLibrary_UpsertEpisode_Success
--- PASS: TestUserLibrary_UpsertEpisode_Success (0.39s)
=== RUN   TestUserLibrary_UpsertSeason_Success
--- PASS: TestUserLibrary_UpsertSeason_Success (0.41s)
=== RUN   TestUserLibrary_UpsertShow_Success
--- PASS: TestUserLibrary_UpsertShow_Success (0.41s)
--- PASS: TestUserLibrarySuite (9.67s)
PASS
superdecimal commented 8 years ago

👍