mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 22:24:31 +08:00
Chore: Remove public vars in setting package (#81018)
Removes the public variable setting.SecretKey plus some other ones. Introduces some new functions for creating setting.Cfg.
This commit is contained in:

committed by
GitHub

parent
147bf01745
commit
6768c6c059
@ -479,14 +479,14 @@ func TestIntegrationUserAuthToken(t *testing.T) {
|
||||
token, err = ctx.tokenService.RotateToken(context.Background(), auth.RotateCommand{UnHashedToken: token.UnhashedToken})
|
||||
require.NoError(t, err)
|
||||
assert.True(t, token.UnhashedToken != prev)
|
||||
assert.True(t, token.PrevAuthToken == hashToken(prev))
|
||||
assert.True(t, token.PrevAuthToken == hashToken("", prev))
|
||||
})
|
||||
|
||||
t.Run("should rotate token when called with previous", func(t *testing.T) {
|
||||
newPrev := token.UnhashedToken
|
||||
token, err = ctx.tokenService.RotateToken(context.Background(), auth.RotateCommand{UnHashedToken: prev})
|
||||
require.NoError(t, err)
|
||||
assert.True(t, token.PrevAuthToken == hashToken(newPrev))
|
||||
assert.True(t, token.PrevAuthToken == hashToken("", newPrev))
|
||||
})
|
||||
|
||||
t.Run("should not rotate token when called with old previous", func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user