-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
general: added mocking library [https://github.com/matryer/moq] for t…
…esting with mocked interfaces website: added basic tests for pending and submit endpoints, these are in no way complete but are a start to actually do testing. The basic test in pending also found us parsing TrackIDs and SubmissionIDs with strconv.Atoi which does not support the range that these types have so they now use ParseUint. Same also goes for TrackID.String now using FormatUint rather than Iota. website: replacement submissions are now checked against the database to see if they're actually in need of a replacement.
- Loading branch information
Showing
11 changed files
with
2,510 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package radio | ||
|
||
//go:generate go generate ./rpc/generate.go | ||
//go:generate moq -out mocks/radio.gen.go -pkg mocks . StorageService StorageTx TrackStorage SubmissionStorage | ||
//go:generate moq -out mocks/templates.gen.go -pkg mocks ./templates/ Executor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.