-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More server DB tests #854
More server DB tests #854
Conversation
16af005
to
119dd7c
Compare
@@ -14,6 +14,7 @@ type TUFFile struct { | |||
|
|||
// TableName sets a specific table name for TUFFile | |||
func (g TUFFile) TableName() string { | |||
// NOTE: if this value changes, please also change it in SQLStorage.Delete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth making the table names constants in the storage
package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately we didn't want to string-interpolate an SQL statement. :| Which means hard-coding it in the DELETE string. Probably the right way to fix this is to submit a patch to GORM upstream to enable hard-delete?
Although there's this scope.Search.Unscoped
check in the delete function that I don't really know how to use: https://github.com/jinzhu/gorm/blob/master/callback_delete.go#L29 - maybe that does something interesting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although hmm... let me try: https://github.com/jinzhu/gorm/issues/342
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that seems to work, thanks!
this is awesome, LGTM pending CI! |
036333b
to
c31aa99
Compare
LGTM! |
needs a rebase |
c31aa99
to
4b6eb60
Compare
…tion tests. Convert SQL db's deletes to hard deletes, since soft deletes would prevent us from using the same namespace in the future. Signed-off-by: Ying Li <[email protected]>
… the rethinkdb server health check to get info on the required tables, since listing tables does not check the user permission. Signed-off-by: Ying Li <[email protected]>
…dy exists in a DB, one where it doesn't Signed-off-by: Ying Li <[email protected]>
Signed-off-by: Ying Li <[email protected]>
4b6eb60
to
3dbfaa9
Compare
This finishes the refactor in #824 of the server storage tests refactor to take a DB type.
In addition, this fixes: