Open bgreg1012 opened 4 years ago
@eversC just a heads up ☝️ any suggestions?
Taking a look
For now, though, the test seems to fail:
$ go test -v
=== RUN TestProcessLine
--- FAIL: TestProcessLine (0.00s)
main_test.go:73: Got ~ result = "************" -> -> (known after apply) *known after apply), want ~ result = "************" -> (known after apply)
main_test.go:73: Got ~ id = "**************************************************************************************" -> -> (known after apply)*known after apply), want ~ id = "**************************************************************************************" -> (known after apply)
=== RUN TestGetCurrentResource
--- PASS: TestGetCurrentResource (0.00s)
=== RUN TestPlanStatus
--- PASS: TestPlanStatus (0.00s)
=== RUN TestMaskValue
--- PASS: TestMaskValue (0.00s)
FAIL
exit status 1
FAIL _/tfmask 0.415s
Tests are failing? 🤔 When I run locally on that branch they pass:
=== RUN TestProcessLine
--- PASS: TestProcessLine (0.00s)
=== RUN TestGetCurrentResource
--- PASS: TestGetCurrentResource (0.00s)
=== RUN TestPlanStatus
--- PASS: TestPlanStatus (0.00s)
=== RUN TestMaskValue
--- PASS: TestMaskValue (0.00s)
PASS
ok github.com/bgreg1012/tfmask 0.030s```
@bgreg1012 you're right, I was running it on your master branch, which didn't have the 2nd commit 🤦
we should put this all in the makefile, but if you run
mkdir release
go build
mv tfmask release
cd tests
make test
I did a diff of the output of that on your branch, compared to cloudposse/tfmask
, and it looks like values of the "random_id" resource are now revealed
and it looks like values of the "random_id" resource are now revealed
@bgreg1012 were you able to take a look at this?
I can confirm with @eversC there's a regression
Please note that running make -C tests test
requires human spot-checking =/ not really good tests, just more like a sanity check.
Hi @bgreg1012 , thanks for opening this - any chance you could look into the tests as mentioned by @osterman?
Hi, I have a use-case in Terraform 0.12 where I'm adding new resources and I found that the reTfPlanLine regex wasn't capturing lines like:
+ token = "abC123ABc"
. To fix this I added another capture group in reTfPlanLine to match the scenario where-> ...
may not exist, and the logic to handle the different size capture groups.