Datastore tests (#551)

* common datastore tests

* fix Datastore.UpdateApp

* remove extra datastore tests

* datastore test fixes
This commit is contained in:
Jordan Krage
2017-03-01 10:40:08 -06:00
committed by Travis Reeder
parent 56e43ac772
commit 3fd3da87f3
10 changed files with 852 additions and 773 deletions

View File

@@ -53,6 +53,22 @@ func (a *App) Validate() error {
return nil
}
// UpdateConfig adds entries from patch to a.Config, and removes entries with empty values.
func (a *App) UpdateConfig(patch Config) {
if patch != nil {
if a.Config == nil {
a.Config = make(Config)
}
for k, v := range patch {
if v == "" {
delete(a.Config, k)
} else {
a.Config[k] = v
}
}
}
}
type AppFilter struct {
Name string
}