Fix some broken tests that were expecting nil but are now getting an empty struct

This commit is contained in:
Jeff Mitchell committed 2020-09-21 16:03:47 -04:00
1 parent 21f5cc274f
commit 6a09e0966e
10 files changed
+16 -3

No files matched your search

@@ -208,6 +208,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteAccountRequest{
Id: ac.GetPublicId(),
},
res: &pbs.DeleteAccountResponse{},
errCode: codes.OK,
},
{
@@ -235,6 +235,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteAuthMethodRequest{
Id: am.GetPublicId(),
},
res: &pbs.DeleteAuthMethodResponse{},
errCode: codes.OK,
},
{
@@ -220,6 +220,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteAuthTokenRequest{
Id: at.GetPublicId(),
},
res: &pbs.DeleteAuthTokenResponse{},
errCode: codes.OK,
},
{
@@ -297,6 +297,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteGroupRequest{
Id: og.GetPublicId(),
},
res: &pbs.DeleteGroupResponse{},
errCode: codes.OK,
},
{
@@ -321,6 +322,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteGroupRequest{
Id: pg.GetPublicId(),
},
res: &pbs.DeleteGroupResponse{},
errCode: codes.OK,
},
{
@@ -238,6 +238,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteHostCatalogRequest{
Id: hc.GetPublicId(),
},
res: &pbs.DeleteHostCatalogResponse{},
errCode: codes.OK,
},
{
@@ -196,15 +196,16 @@ func TestDelete(t *testing.T) {
errCode codes.Code
}{
{
name: "Delete an Existing Host",
name: "Delete an Existing Host Set",
scopeId: proj.GetPublicId(),
req: &pbs.DeleteHostSetRequest{
Id: h.GetPublicId(),
},
res: &pbs.DeleteHostSetResponse{},
errCode: codes.OK,
},
{
name: "Delete bad id Host",
name: "Delete bad id Host Set",
scopeId: proj.GetPublicId(),
req: &pbs.DeleteHostSetRequest{
Id: static.HostSetPrefix + "_doesntexis",
@@ -212,7 +213,7 @@ func TestDelete(t *testing.T) {
errCode: codes.NotFound,
},
{
name: "Delete bad host catalog id in Host",
name: "Delete bad host catalog id in Host Set",
scopeId: proj.GetPublicId(),
req: &pbs.DeleteHostSetRequest{
Id: h.GetPublicId(),
@@ -197,6 +197,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteHostRequest{
Id: h.GetPublicId(),
},
res: &pbs.DeleteHostResponse{},
errCode: codes.OK,
},
{
@@ -273,6 +273,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteRoleRequest{
Id: or.GetPublicId(),
},
res: &pbs.DeleteRoleResponse{},
errCode: codes.OK,
},
{
@@ -297,6 +298,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteRoleRequest{
Id: pr.GetPublicId(),
},
res: &pbs.DeleteRoleResponse{},
errCode: codes.OK,
},
{
@@ -304,6 +304,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteScopeRequest{
Id: proj.GetPublicId(),
},
res: &pbs.DeleteScopeResponse{},
errCode: codes.OK,
},
{
@@ -328,6 +329,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteScopeRequest{
Id: org.GetPublicId(),
},
res: &pbs.DeleteScopeResponse{},
errCode: codes.OK,
},
{
@@ -219,6 +219,7 @@ func TestDelete(t *testing.T) {
req: &pbs.DeleteTargetRequest{
Id: tar.GetPublicId(),
},
res: &pbs.DeleteTargetResponse{},
errCode: codes.OK,
},
{