diff options
Diffstat (limited to 'integrations/api_private_serv_test.go')
-rw-r--r-- | integrations/api_private_serv_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/integrations/api_private_serv_test.go b/integrations/api_private_serv_test.go index a58d927cb9..fd3cb25ef2 100644 --- a/integrations/api_private_serv_test.go +++ b/integrations/api_private_serv_test.go @@ -47,7 +47,7 @@ func TestAPIPrivateServ(t *testing.T) { results, err := private.ServCommand(ctx, 1, "user2", "repo1", perm.AccessModeWrite, "git-upload-pack", "") assert.NoError(t, err) assert.False(t, results.IsWiki) - assert.False(t, results.IsDeployKey) + assert.Zero(t, results.DeployKeyID) assert.Equal(t, int64(1), results.KeyID) assert.Equal(t, "user2@localhost", results.KeyName) assert.Equal(t, "user2", results.UserName) @@ -70,7 +70,7 @@ func TestAPIPrivateServ(t *testing.T) { results, err = private.ServCommand(ctx, 1, "user15", "big_test_public_1", perm.AccessModeRead, "git-upload-pack", "") assert.NoError(t, err) assert.False(t, results.IsWiki) - assert.False(t, results.IsDeployKey) + assert.Zero(t, results.DeployKeyID) assert.Equal(t, int64(1), results.KeyID) assert.Equal(t, "user2@localhost", results.KeyName) assert.Equal(t, "user2", results.UserName) @@ -92,7 +92,7 @@ func TestAPIPrivateServ(t *testing.T) { results, err = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_1", perm.AccessModeRead, "git-upload-pack", "") assert.NoError(t, err) assert.False(t, results.IsWiki) - assert.True(t, results.IsDeployKey) + assert.NotZero(t, results.DeployKeyID) assert.Equal(t, deployKey.KeyID, results.KeyID) assert.Equal(t, "test-deploy", results.KeyName) assert.Equal(t, "user15", results.UserName) @@ -129,7 +129,7 @@ func TestAPIPrivateServ(t *testing.T) { results, err = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", perm.AccessModeRead, "git-upload-pack", "") assert.NoError(t, err) assert.False(t, results.IsWiki) - assert.True(t, results.IsDeployKey) + assert.NotZero(t, results.DeployKeyID) assert.Equal(t, deployKey.KeyID, results.KeyID) assert.Equal(t, "test-deploy", results.KeyName) assert.Equal(t, "user15", results.UserName) @@ -142,7 +142,7 @@ func TestAPIPrivateServ(t *testing.T) { results, err = private.ServCommand(ctx, deployKey.KeyID, "user15", "big_test_private_2", perm.AccessModeWrite, "git-upload-pack", "") assert.NoError(t, err) assert.False(t, results.IsWiki) - assert.True(t, results.IsDeployKey) + assert.NotZero(t, results.DeployKeyID) assert.Equal(t, deployKey.KeyID, results.KeyID) assert.Equal(t, "test-deploy", results.KeyName) assert.Equal(t, "user15", results.UserName) |