Skip to content

Commit

Permalink
add SupportDatastoreEmulator field to aetest Options (#173)
Browse files Browse the repository at this point in the history
Pass through --support_datastore_emulator. https://issuetracker.google.com/issues/119212211
  • Loading branch information
vvakame authored and sbuss committed Dec 3, 2018
1 parent b80b43b commit a37df13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aetest/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ type Options struct {
// StronglyConsistentDatastore is whether the local datastore should be
// strongly consistent. This will diverge from production behaviour.
StronglyConsistentDatastore bool
// SupportDatastoreEmulator is whether use Cloud Datastore Emulator or
// use old SQLite based Datastore backend or use default settings.
SupportDatastoreEmulator *bool
// SuppressDevAppServerLog is whether the dev_appserver running in tests
// should output logs.
SuppressDevAppServerLog bool
Expand Down
3 changes: 3 additions & 0 deletions aetest/instance_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ func (i *instance) startChild() (err error) {
if i.opts != nil && i.opts.StronglyConsistentDatastore {
appserverArgs = append(appserverArgs, "--datastore_consistency_policy=consistent")
}
if i.opts != nil && i.opts.SupportDatastoreEmulator != nil {
appserverArgs = append(appserverArgs, fmt.Sprintf("--support_datastore_emulator=%t", *i.opts.SupportDatastoreEmulator))
}
appserverArgs = append(appserverArgs, filepath.Join(i.appDir, "app"))

i.child = exec.Command(python,
Expand Down

0 comments on commit a37df13

Please sign in to comment.