Testcase is intially written, but fails on updating the test
markussiebert opened this issue · 3 comments
Hi,
if I create the test case, everything is fine... if I update it, it is updated in a wrong way so that from this point on all tests will fail. It only is possible to fix if I delete the snaps and create them from scratch...
--- FAIL: Test_UpdateSecret (0.00s)
mocks.go:24:
Snapshot
Received
>>>SecretsManagerMockClient.PutSecretValue.Input
{
ClientRequestToken: "4547532a137611d83958d17095c6c2d38ae0036a760c3b79c9dd5957d1c20cf2.yaml",
SecretId: "arn:${Partition}:secretsmanager:::secret:${Region}:${Account}:secret:${SecretId}",
SecretString: <sensitive>
}
Do you need more information?
Hello 👋 , could you give me some more information and/or a way to reproduce it ? This looks weird and can't think of a reason on top of my head why this might be happening
Okay had a look at your snapshot. The issue is the special ${}
chars and a method in a regex I use that I was not aware of.
I should be using ReplaceAllLiteralString
instead of ReplaceAllString
.
I believe you have found all the edge cases, sorry and thank you for that, I use this library but not so heavily so I haven't found all those issues 😓
Going to create a pr and release a "fix" version for this.
Going to release now a new version with the fix, if the issue persists feel free to reopen it