From 6ff8237e7867b2a5c6a9cc69dc565ed8501b5c5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Sterba?= <andre.sterba@stud.h-da.de>
Date: Mon, 4 Jul 2022 11:14:49 +0200
Subject: [PATCH] Fix tests

---
 controller/api/role_test.go | 6 ++++--
 controller/api/user_test.go | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/controller/api/role_test.go b/controller/api/role_test.go
index 2dd79fd69..785ae3128 100644
--- a/controller/api/role_test.go
+++ b/controller/api/role_test.go
@@ -61,7 +61,7 @@ func TestGetRole(t *testing.T) {
 		ctx  context.Context
 		addr string
 		name string
-		uuid uuid.UUID
+		id   uuid.UUID
 	}
 	tests := []struct {
 		name    string
@@ -75,6 +75,7 @@ func TestGetRole(t *testing.T) {
 				ctx:  context.TODO(),
 				addr: testAPIEndpoint,
 				name: "adminTestRole",
+				id:   uuid.Nil,
 			},
 			want: &apb.GetRoleResponse{
 				Status: apb.Status_STATUS_OK,
@@ -91,6 +92,7 @@ func TestGetRole(t *testing.T) {
 				ctx:  context.TODO(),
 				addr: testAPIEndpoint,
 				name: "not role",
+				id:   uuid.Nil,
 			},
 			want:    nil,
 			wantErr: true,
@@ -98,7 +100,7 @@ func TestGetRole(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			got, err := GetRole(tt.args.ctx, tt.args.addr, tt.args.name, tt.args.uuid)
+			got, err := GetRole(tt.args.ctx, tt.args.addr, tt.args.name, tt.args.id)
 			if (err != nil) != tt.wantErr {
 				t.Errorf("GetRole() error = %v, wantErr %v", err, tt.wantErr)
 				return
diff --git a/controller/api/user_test.go b/controller/api/user_test.go
index 4687df95c..afa2f6dc6 100644
--- a/controller/api/user_test.go
+++ b/controller/api/user_test.go
@@ -79,6 +79,7 @@ func TestGetUser(t *testing.T) {
 				ctx:  context.TODO(),
 				addr: testAPIEndpoint,
 				name: "testAdmin",
+				id:   uuid.Nil,
 			},
 			want: &apb.GetUserResponse{
 				Status: apb.Status_STATUS_OK,
@@ -95,6 +96,7 @@ func TestGetUser(t *testing.T) {
 				ctx:  context.TODO(),
 				addr: testAPIEndpoint,
 				name: "foos",
+				id:   uuid.Nil,
 			},
 			want:    nil,
 			wantErr: true,
-- 
GitLab