-
Notifications
You must be signed in to change notification settings - Fork 246
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
Add integration testing for the migrate command #551
Conversation
b382b7f
to
a6ba611
Compare
// InitFunc initialize a datastore instance from a uri that has been | ||
// generated from a TestDatastoreBuilder |
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.
// InitFunc initialize a datastore instance from a uri that has been | |
// generated from a TestDatastoreBuilder | |
// InitFunc initializes a datastore instance from a uri that has been | |
// generated from a RunningEngineForTest |
// ExternalEnvVars are the environment variables to be set. | ||
ExternalEnvVars() []string | ||
} | ||
|
||
// TestDatastoreBuilderFunc allows a function to implement TestDatastoreBuilder | ||
type TestDatastoreBuilderFunc func(t testing.TB, initFunc InitFunc) datastore.Datastore |
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.
I would rename these too to match
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.
Removed
@@ -64,6 +66,10 @@ var ( | |||
sb = sq.StatementBuilder.PlaceholderFormat(sq.Question) | |||
) | |||
|
|||
func init() { | |||
datastore.Engines = append(datastore.Engines, Engine) |
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.
👍
a6ba611
to
1ea1a4b
Compare
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.
LGTM
Runs each datastore's backing engine or service in a container, and then creates another container with SpiceDB to perform the migration