Skip to content

Commit

Permalink
re-apply PR golang#232 to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
zevdg committed Sep 8, 2022
1 parent d981f2f commit 5ffcc78
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion v2/aetest/instance.go
Expand Up @@ -231,6 +231,11 @@ func (i *instance) startChild() (err error) {
return err
}

datastorePath := os.Getenv("APPENGINE_DEV_APPSERVER_DATASTORE_PATH")
if len(datastorePath) == 0 {
datastorePath = filepath.Join(i.appDir, "datastore")
}

appserverArgs = append(appserverArgs,
"--port=0",
"--api_port=0",
Expand All @@ -239,7 +244,7 @@ func (i *instance) startChild() (err error) {
"--skip_sdk_update_check=true",
"--clear_datastore=true",
"--clear_search_indexes=true",
"--datastore_path", filepath.Join(i.appDir, "datastore"),
"--datastore_path", datastorePath,
)
if i.opts != nil && i.opts.StronglyConsistentDatastore {
appserverArgs = append(appserverArgs, "--datastore_consistency_policy=consistent")
Expand Down

0 comments on commit 5ffcc78

Please sign in to comment.