You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We introduced a logging sink in #9, but we want to be able to make some assertions about its behavior and automatically test them.
We want to know:
That log output doesn't show up in test output by default.
That writing to files using TF_LOG_PATH works.
That the TF_LOG_CLI environment variable works.
That the TF_LOG_PROVIDER environment variable works for the provider under test.
That the TF_LOG environment variable works.
We notably do not care if Terraform, the SDKs, or the providers are filtering correctly; we only care that the filtering implemented by the log sink is implemented correctly.
This is tricky, because we're testing the output of tests. We may need to puppet go test around so we can inspect its stderr and stdout.
We could in theory unit test this, but I think the big thing I want tested is that first bullet point, and the problem there generally tends not to be bugs in individual pieces, but individual pieces not fitting together the way we thought they did. And faking unit tests for that first one seems hacky. So I think we want some actual acceptance tests here.
@bflad suggested writing a dummy provider and puppeting it with terraform-exec, running in a os/exec'd go test. I think that's not a bad idea, but it's a bit of a project we may not want to undertake right this second.
The text was updated successfully, but these errors were encountered:
We introduced a logging sink in #9, but we want to be able to make some assertions about its behavior and automatically test them.
We want to know:
We notably do not care if Terraform, the SDKs, or the providers are filtering correctly; we only care that the filtering implemented by the log sink is implemented correctly.
This is tricky, because we're testing the output of tests. We may need to puppet
go test
around so we can inspect itsstderr
andstdout
.We could in theory unit test this, but I think the big thing I want tested is that first bullet point, and the problem there generally tends not to be bugs in individual pieces, but individual pieces not fitting together the way we thought they did. And faking unit tests for that first one seems hacky. So I think we want some actual acceptance tests here.
@bflad suggested writing a dummy provider and puppeting it with terraform-exec, running in a
os/exec
'dgo test
. I think that's not a bad idea, but it's a bit of a project we may not want to undertake right this second.The text was updated successfully, but these errors were encountered: