(t *testing.T)
| 281 | } |
| 282 | |
| 283 | func TestMasterKey_EncryptIfNeeded(t *testing.T) { |
| 284 | key := createTestMasterKey(testKMSARN) |
| 285 | assert.NoError(t, key.EncryptIfNeeded([]byte("data"))) |
| 286 | |
| 287 | encryptedKey := key.EncryptedKey |
| 288 | assert.NotEmpty(t, encryptedKey) |
| 289 | |
| 290 | assert.NoError(t, key.EncryptIfNeeded([]byte("some other data"))) |
| 291 | assert.Equal(t, encryptedKey, key.EncryptedKey) |
| 292 | } |
| 293 | |
| 294 | func TestMasterKey_EncryptedDataKey(t *testing.T) { |
| 295 | key := &MasterKey{EncryptedKey: "some key"} |
nothing calls this directly
no test coverage detected