mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Check error on triggers with non-existent app test (#1112)
This commit is contained in:
committed by
Owen Cliffe
parent
26ec214739
commit
9f90530465
@@ -1234,6 +1234,9 @@ func RunTriggersTest(t *testing.T, dsf DataStoreFunc, rp ResourceProvider) {
|
|||||||
t.Run("non-existant app", func(t *testing.T) {
|
t.Run("non-existant app", func(t *testing.T) {
|
||||||
nonMatchingFilter := &models.TriggerFilter{AppID: "notexist"}
|
nonMatchingFilter := &models.TriggerFilter{AppID: "notexist"}
|
||||||
triggers, err := ds.GetTriggers(ctx, nonMatchingFilter)
|
triggers, err := ds.GetTriggers(ctx, nonMatchingFilter)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("expecting no error, got: %s", err)
|
||||||
|
}
|
||||||
if len(triggers.Items) != 0 && err == nil {
|
if len(triggers.Items) != 0 && err == nil {
|
||||||
t.Fatalf("expected empty trigger list and no error, but got list [%v] and err %s", triggers.Items, err)
|
t.Fatalf("expected empty trigger list and no error, but got list [%v] and err %s", triggers.Items, err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user