mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: additional check when decrypting values (#34637)
* Chore: additional check when decrypting values * Apply suggestions from code review
This commit is contained in:
committed by
GitHub
parent
ab26c4dfa4
commit
a5082ab112
@@ -27,4 +27,11 @@ func TestEncryption(t *testing.T) {
|
||||
|
||||
assert.Equal(t, []byte("grafana"), decrypted)
|
||||
})
|
||||
|
||||
t.Run("decrypting empty payload should not fail", func(t *testing.T) {
|
||||
_, err := Decrypt([]byte(""), "1234")
|
||||
require.Error(t, err)
|
||||
|
||||
assert.Equal(t, "unable to compute salt", err.Error())
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user