Add appfilter and tests (#337)

add appfilter and tests
This commit is contained in:
Pedro Nasser
2016-11-24 03:46:42 -02:00
committed by GitHub
parent c307c9375b
commit 01d5a81389
7 changed files with 67 additions and 19 deletions

View File

@@ -126,6 +126,15 @@ func TestPostgres(t *testing.T) {
t.Fatalf("Test GetApps: expected `app.Name` to be `%s` but it was `%s`", app.Name, testApp.Name)
}
apps, err = ds.GetApps(ctx, &models.AppFilter{Name: "Tes%"})
if err != nil {
t.Log(buf.String())
t.Fatalf("Test GetApps(filter): unexpected error %v", err)
}
if len(apps) == 0 {
t.Fatal("Test GetApps(filter): expected result count to be greater than 0")
}
// Testing app delete
err = ds.RemoveApp(ctx, "")
if err != models.ErrDatastoreEmptyAppName {