-
This commit is contained in:
@ -420,12 +420,15 @@ func (suite *IntegrationTestSuite) TestStaticTokenWorkflow() {
|
||||
|
||||
assert.True(t, verifyResp.Valid)
|
||||
assert.Equal(t, domain.TokenTypeStatic, verifyResp.TokenType)
|
||||
// Note: The current service implementation returns ["basic"] as a placeholder
|
||||
assert.Contains(t, verifyResp.Permissions, "basic")
|
||||
// Verify that we get the actual permissions that were granted to the token
|
||||
assert.Contains(t, verifyResp.Permissions, "repo.read")
|
||||
assert.Contains(t, verifyResp.Permissions, "repo.write")
|
||||
|
||||
if verifyResp.PermissionResults != nil {
|
||||
// Check that we get some permission results
|
||||
// Check that we get permission results for the requested permissions
|
||||
assert.NotEmpty(t, verifyResp.PermissionResults)
|
||||
// The token should have the "repo.read" permission we requested
|
||||
assert.True(t, verifyResp.PermissionResults["repo.read"])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user