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

test(upgrade): add upgrade tests for systest/plugin #8896

Merged
merged 7 commits into from
Aug 29, 2023

Conversation

jbhamra1
Copy link
Contributor

@jbhamra1 jbhamra1 commented Jul 5, 2023

This is an existing 'integration' test, now transformed to run for 'integration' and 'upgrade' using dgraphtest framework. Additionally, leveraging 'testify/suite' package's SetupTest() / SetupSubTest() / TeardownTest() / TeardownSubTest() functionality during the test runs. 'integration' tests are still run using t.go and the dgraphtest framework acts as a no-op for now. Going forward, there are plans to have dgraphtest framework take over the t.go. 'upgrade' used in the tests is Dgraph version upgrade from a source version to a target version using 'BackupRestore' and 'InPlace'.

Plugin insights: Hope this link will help here https://dgraph.io/docs/query-language/indexing-custom-tokenizers/#implementing-a-plugin

Closes: https://dgraph.atlassian.net/browse/DGRAPHCORE-304

@dgraph-bot dgraph-bot added area/testing Testing related issues go Pull requests that update Go code labels Jul 5, 2023
@mangalaman93 mangalaman93 marked this pull request as ready for review July 5, 2023 14:42
dgraphtest/image.go Outdated Show resolved Hide resolved
systest/plugin/integration_test.go Show resolved Hide resolved
systest/plugin/integration_test.go Outdated Show resolved Hide resolved
systest/plugin/integration_test.go Outdated Show resolved Hide resolved
systest/plugin/plugin_test.go Outdated Show resolved Hide resolved
systest/plugin/plugin_test.go Show resolved Hide resolved
systest/plugin/plugin_test.go Outdated Show resolved Hide resolved
systest/plugin/plugin_test.go Outdated Show resolved Hide resolved
systest/plugin/upgrade_test.go Outdated Show resolved Hide resolved
systest/plugin/upgrade_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mangalaman93 mangalaman93 left a comment

Choose a reason for hiding this comment

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

Looks pretty good to go, just a few more comments. And you need to undo the comment you added around the definition of type testCase.

dgraphtest/image.go Outdated Show resolved Hide resolved
systest/plugin/integration_test.go Outdated Show resolved Hide resolved
systest/plugin/integration_test.go Outdated Show resolved Hide resolved
systest/plugin/upgrade_test.go Outdated Show resolved Hide resolved
systest/plugin/integration_test.go Outdated Show resolved Hide resolved
systest/plugin/plugin_test.go Outdated Show resolved Hide resolved
systest/plugin/plugin_test.go Outdated Show resolved Hide resolved
@jbhamra1 jbhamra1 force-pushed the jassi/systest_plugin branch 2 times, most recently from b4fc0b2 to dc06871 Compare July 26, 2023 12:16
systest/plugin/plugin_test.go Outdated Show resolved Hide resolved
systest/plugin/upgrade_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mangalaman93 mangalaman93 left a comment

Choose a reason for hiding this comment

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

A few minor comments, LGTM otherwise.

dgraphtest/config.go Show resolved Hide resolved
systest/plugin/upgrade_test.go Outdated Show resolved Hide resolved
systest/plugin/upgrade_test.go Outdated Show resolved Hide resolved
mangalaman93
mangalaman93 previously approved these changes Aug 3, 2023
dgraphtest/image.go Outdated Show resolved Hide resolved
dgraphtest/local_cluster.go Outdated Show resolved Hide resolved
dgraphtest/local_cluster.go Outdated Show resolved Hide resolved
dgraphtest/local_cluster.go Outdated Show resolved Hide resolved
@jbhamra1 jbhamra1 force-pushed the jassi/systest_plugin branch 5 times, most recently from ee932d6 to 58d1bc2 Compare August 20, 2023 07:31
mangalaman93
mangalaman93 previously approved these changes Aug 21, 2023
Copy link
Contributor

@mangalaman93 mangalaman93 left a comment

Choose a reason for hiding this comment

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

Up to you if you want to reduce the 2 min wait to 30 second before killing the container.

@mangalaman93 mangalaman93 changed the title Jassi/systest plugin test(upgrade): add upgrade tests for systest/plugin Aug 21, 2023
Copy link
Contributor

@all-seeing-code all-seeing-code left a comment

Choose a reason for hiding this comment

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

Would you mind providing some more details in the PR description about the motivation behind this change and a description of the tests? Additionally, I'd be grateful if you could help me understand the role of plugins within dgraph. An example here would be really insightful. Thank you!

mangalaman93
mangalaman93 previously approved these changes Aug 23, 2023
Copy link
Contributor

@all-seeing-code all-seeing-code left a comment

Choose a reason for hiding this comment

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

Few comments, rest looks good.

@@ -57,7 +58,9 @@ type LocalCluster struct {
tempBinDir string
tempSecretsDir string
encKeyPath string
lowerThanV21 bool

lowerThanV21 bool
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this boolean?

dgraphtest/local_cluster.go Show resolved Hide resolved
@mangalaman93 mangalaman93 merged commit 071c85b into main Aug 29, 2023
11 checks passed
@mangalaman93 mangalaman93 deleted the jassi/systest_plugin branch August 29, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Testing related issues go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

4 participants