From b2febb7a1d97f400cd323764e3e0644952c835c4 Mon Sep 17 00:00:00 2001 From: 1998-felix Date: Thu, 29 Aug 2024 19:24:35 +0300 Subject: [PATCH] test: update tests Signed-off-by: 1998-felix --- bootstrap/events/producer/streams_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bootstrap/events/producer/streams_test.go b/bootstrap/events/producer/streams_test.go index 09db942e899..cf7625e007c 100644 --- a/bootstrap/events/producer/streams_test.go +++ b/bootstrap/events/producer/streams_test.go @@ -815,7 +815,7 @@ func TestList(t *testing.T) { identifyErr error superAdminAuthRes *magistrala.AuthorizeRes domainAdminAuthRes *magistrala.AuthorizeRes - listObjectsResponse *magistrala.ListObjectsRes + listObjectsResponse []string listObjectsErr error superAdmiAuthErr error domainAdmiAuthErr error @@ -838,7 +838,7 @@ func TestList(t *testing.T) { filter: bootstrap.Filter{}, offset: 0, limit: 10, - listObjectsResponse: &magistrala.ListObjectsRes{}, + listObjectsResponse: []string{}, err: nil, event: map[string]interface{}{ "thing_id": c.ThingID, @@ -867,7 +867,7 @@ func TestList(t *testing.T) { filter: bootstrap.Filter{}, offset: 0, limit: 10, - listObjectsResponse: &magistrala.ListObjectsRes{}, + listObjectsResponse: []string{}, err: nil, event: map[string]interface{}{ "thing_id": c.ThingID, @@ -896,7 +896,7 @@ func TestList(t *testing.T) { filter: bootstrap.Filter{}, offset: 0, limit: 10, - listObjectsResponse: &magistrala.ListObjectsRes{}, + listObjectsResponse: []string{}, err: nil, event: map[string]interface{}{ "thing_id": c.ThingID, @@ -927,7 +927,7 @@ func TestList(t *testing.T) { filter: bootstrap.Filter{}, offset: 0, limit: 10, - listObjectsResponse: &magistrala.ListObjectsRes{}, + listObjectsResponse: []string{}, superAdminAuthRes: &magistrala.AuthorizeRes{Authorized: false}, superAdmiAuthErr: svcerr.ErrAuthorization, err: nil, @@ -941,7 +941,7 @@ func TestList(t *testing.T) { filter: bootstrap.Filter{}, offset: 0, limit: 10, - listObjectsResponse: &magistrala.ListObjectsRes{}, + listObjectsResponse: []string{}, superAdminAuthRes: &magistrala.AuthorizeRes{Authorized: false}, domainAdminAuthRes: &magistrala.AuthorizeRes{Authorized: false}, superAdmiAuthErr: svcerr.ErrAuthorization, @@ -957,7 +957,7 @@ func TestList(t *testing.T) { filter: bootstrap.Filter{}, offset: 0, limit: 10, - listObjectsResponse: &magistrala.ListObjectsRes{}, + listObjectsResponse: []string{}, superAdminAuthRes: &magistrala.AuthorizeRes{Authorized: false}, domainAdminAuthRes: &magistrala.AuthorizeRes{Authorized: false}, listObjectsErr: svcerr.ErrNotFound, @@ -973,7 +973,7 @@ func TestList(t *testing.T) { filter: bootstrap.Filter{}, offset: 0, limit: 10, - listObjectsResponse: &magistrala.ListObjectsRes{}, + listObjectsResponse: []string{}, superAdminAuthRes: &magistrala.AuthorizeRes{Authorized: true}, retrieveErr: nil, err: nil, @@ -987,7 +987,7 @@ func TestList(t *testing.T) { filter: bootstrap.Filter{}, offset: 0, limit: 10, - listObjectsResponse: &magistrala.ListObjectsRes{}, + listObjectsResponse: []string{}, superAdminAuthRes: &magistrala.AuthorizeRes{Authorized: false}, domainAdminAuthRes: &magistrala.AuthorizeRes{Authorized: true}, retrieveErr: nil, @@ -1002,7 +1002,7 @@ func TestList(t *testing.T) { filter: bootstrap.Filter{}, offset: 0, limit: 10, - listObjectsResponse: &magistrala.ListObjectsRes{}, + listObjectsResponse: []string{}, superAdminAuthRes: &magistrala.AuthorizeRes{Authorized: false}, domainAdminAuthRes: &magistrala.AuthorizeRes{Authorized: false}, retrieveErr: nil,