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 test for Upsert block #68

Merged
merged 2 commits into from
Jun 20, 2019
Merged

Add test for Upsert block #68

merged 2 commits into from
Jun 20, 2019

Conversation

mangalaman93
Copy link
Member

@mangalaman93 mangalaman93 commented Jun 17, 2019

Should merge it after the PR hypermodeinc/dgraph#3412 is merged.

This change is Reviewable

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @gitlw, @mangalaman93, @martinmr, and @pawanrawal)


examples_test.go, line 1064 at r1 (raw file):

	defer toCancel()
	err := dg.Alter(ctx, &api.Operation{
		DropAll: true,

Add a warning so people don't accidentally copy paste this. See below.


examples_test.go, line 1100 at r1 (raw file):

	`
	m2 := `uid(v) <email> "user@dgraph.io" .`
	mu.SetNquads = []byte(m2)

Might make sense to also do a deletion of uid(v) <email> "user@dgraph0.io" .


examples_test.go, line 1131 at r1 (raw file):

	ctx := context.Background()
	if err := dg.Alter(ctx, &api.Operation{DropAll: true}); err != nil {

Add warning here to remove this line if you're copy pasting this.

@mangalaman93 mangalaman93 requested a review from manishrjain June 20, 2019 15:19
Copy link
Member Author

@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.

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @gitlw, @manishrjain, @martinmr, and @pawanrawal)


examples_test.go, line 1064 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Add a warning so people don't accidentally copy paste this. See below.

Done.


examples_test.go, line 1100 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Might make sense to also do a deletion of uid(v) <email> "user@dgraph0.io" .

We are overriding the email here. That'd not be required.


examples_test.go, line 1131 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Add warning here to remove this line if you're copy pasting this.

Done.

Copy link

@gitlw gitlw left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on @mangalaman93, @manishrjain, @martinmr, and @pawanrawal)


examples_test.go, line 1167 at r2 (raw file):

		log.Fatal(err)
	}

Add a query and print the output here to verify that the name is Wrong.

Copy link

@gitlw gitlw left a comment

Choose a reason for hiding this comment

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

:lgtm: except for the minor comment below

Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on @mangalaman93, @manishrjain, @martinmr, and @pawanrawal)

Copy link
Contributor

@martinmr martinmr left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @mangalaman93, @manishrjain, and @pawanrawal)


examples_test.go, line 1218 at r2 (raw file):

	fmt.Println(string(resp.Json))
	// Output: {"Me":[{"age":35,"name":"user","email":"user@dgraph.io"}]}
	// {"Me":[]}

what's this second commented out line supposed to mean?

@mangalaman93 mangalaman93 requested a review from martinmr June 20, 2019 18:48
Copy link
Member Author

@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.

Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @mangalaman93, @manishrjain, @martinmr, and @pawanrawal)


examples_test.go, line 1218 at r2 (raw file):

Previously, martinmr (Martin Martinez Rivera) wrote…

what's this second commented out line supposed to mean?

That's the part of the output as well.

@mangalaman93 mangalaman93 merged commit f739157 into master Jun 20, 2019
@mangalaman93 mangalaman93 deleted the aman/upsert branch June 20, 2019 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants