Skip to content
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

Merged
merged 1 commit into from
Apr 22, 2022

Conversation

josephschorr
Copy link
Member

@josephschorr josephschorr commented Apr 21, 2022

Runs each datastore's backing engine or service in a container, and then creates another container with SpiceDB to perform the migration

@josephschorr josephschorr requested review from vroldanbet and a team as code owners April 21, 2022 20:40
@github-actions github-actions bot added area/CLI Affects the command line area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels Apr 21, 2022
@josephschorr josephschorr marked this pull request as draft April 21, 2022 20:40
@josephschorr josephschorr marked this pull request as ready for review April 21, 2022 20:49
Comment on lines 11 to 12
// InitFunc initialize a datastore instance from a uri that has been
// generated from a TestDatastoreBuilder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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
Copy link
Contributor

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

Copy link
Member Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@ecordell ecordell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@josephschorr josephschorr merged commit 1f99372 into authzed:main Apr 22, 2022
@josephschorr josephschorr deleted the migrate-test branch April 22, 2022 16:15
@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/CLI Affects the command line area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants