From d0944086e01507840a3049015092e5c53a00eb11 Mon Sep 17 00:00:00 2001 From: Konstantin Gizdarski <53313394+kosigz-lyft@users.noreply.github.com> Date: Wed, 19 Aug 2020 14:43:37 -0700 Subject: [PATCH] woot woot (#116) Co-authored-by: Konstantin Gizdarski --- pkg/manager/impl/project_manager.go | 4 ++-- tests/project.go | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/manager/impl/project_manager.go b/pkg/manager/impl/project_manager.go index 4841b477a..10c526894 100644 --- a/pkg/manager/impl/project_manager.go +++ b/pkg/manager/impl/project_manager.go @@ -61,7 +61,7 @@ func (m *ProjectManager) ListProjects(ctx context.Context, request admin.Project } func (m *ProjectManager) UpdateProject(ctx context.Context, projectUpdate admin.Project) (*admin.ProjectUpdateResponse, error) { - var response *admin.ProjectUpdateResponse + var response admin.ProjectUpdateResponse projectRepo := m.db.ProjectRepo() // Fetch the existing project if exists. If not, return err and do not update. @@ -78,7 +78,7 @@ func (m *ProjectManager) UpdateProject(ctx context.Context, projectUpdate admin. return nil, err } - return response, nil + return &response, nil } func NewProjectManager(db repositories.RepositoryInterface, config runtimeInterfaces.Configuration) interfaces.ProjectInterface { diff --git a/tests/project.go b/tests/project.go index bd1f7ac4d..a799fb22c 100644 --- a/tests/project.go +++ b/tests/project.go @@ -80,6 +80,9 @@ func TestUpdateProjectDescription(t *testing.T) { Description: "a-new-description", }) + // Assert that update went through without an error. + assert.Nil(t, err) + // Fetch updated projects. projectsUpdated, err := client.ListProjects(ctx, &admin.ProjectListRequest{}) assert.Nil(t, err) @@ -134,6 +137,9 @@ func TestUpdateProjectLabels(t *testing.T) { }, }) + // Assert that update went through without an error. + assert.Nil(t, err) + // Fetch updated projects. projectsUpdated, err := client.ListProjects(ctx, &admin.ProjectListRequest{}) assert.Nil(t, err)