Skip to content

kms unit tests - #148

Merged
amirylm merged 5 commits into
mainfrom
kms-unit-tests
Oct 1, 2026
Merged

amirylm merged 5 commits into
mainfrom
kms-unit-tests

Conversation

@lordofsnakes

Copy link
Copy Markdown
Collaborator

Implemented unit testing kms components

  • Add ciphertext blob round-trip and invalid-input tests
  • Transit Provider has tests for Sign, Encrypt, and CreateKey

GenerateDataKey testing still needs to be added.


func TestTransitProviderCreateKey(t *testing.T) {

t.Run("happy path", func(t *testing.T) {

@amirylm amirylm Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant subtest, keep at the function level

dataKeySpec: dataKeySpecAES256,
expectedPlaintextKeyBase64: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
expectedWrappedKey: "vault:v1:ZmFrZS1lbmNyeXB0ZWQtZGF0YS1rZXk=",
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add another case for invalid

@amirylm
amirylm merged commit 20774e6 into main Oct 1, 2026
5 checks passed
@amirylm
amirylm deleted the kms-unit-tests branch October 1, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants