Skip to content

Commit

Permalink
dgraphtest: add workaround for multiple groot issue in export-import
Browse files Browse the repository at this point in the history
When we perform an export and import into the cluster, this ends
up creating two groot users in the cluster. This PR implements
a workaround so that two groot users are not created to begin with.
With this workaround, now we can also run upgrade tests using
ExportImport upgrade strategy.
  • Loading branch information
mangalaman93 committed Jul 18, 2023
1 parent a506d6d commit 3c7de47
Show file tree
Hide file tree
Showing 8 changed files with 280 additions and 51 deletions.
7 changes: 4 additions & 3 deletions dgraphtest/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ loop2:
return errors.Errorf("restore wasn't started on at least 1 alpha")
}

func (hc *HTTPClient) Export(dest string) error {
const exportRequest = `mutation export($dest: String!, $f: String!) {
export(input: {destination: $dest, format: $f}) {
func (hc *HTTPClient) Export(dest string, namespace int) error {
const exportRequest = `mutation export($dest: String!, $f: String!, $ns: Int) {
export(input: {destination: $dest, format: $f, namespace: $ns}) {
response {
message
}
Expand All @@ -485,6 +485,7 @@ func (hc *HTTPClient) Export(dest string) error {
Variables: map[string]interface{}{
"dest": dest,
"f": "rdf",
"ns": namespace,
},
}

Expand Down
Loading

0 comments on commit 3c7de47

Please sign in to comment.