Closed devenney closed 5 years ago
Possibly related to #15.
It seems that other providers (see terraform-providers/terraform-provider-aws) do not make use of MFA in their testing strategy. Instead, they trust that the underlying SDK has extensively tested the authentication paths.
The solution is thus:
We should also create a user which is identical to (2) with the addition of MFA. It will then be necessary to update ewilde/go-kibana to authenticate as this user to rigorously test the MFA flow.
Terraform Version
v0.11.14
Affected Resource(s)
Logzio test cases. Normal operation appears unaffected.
Terraform Configuration Files
N/A. Test cases in master branch of repository.
Debug Output
Expected Behavior
Test cases authenticate against Logz.io exactly once, exchanging the credentials and MFA token for a session token which is used throughout the tests.
Actual Behavior
The output above is erroneous due to the logic in ewilde/go-kibana logzio_authentication_handler.go#L206.
The real error is masked:
ConfigureProvider()
is called multiple times per test case. Specifically, every timectx.Refresh()
,ctx.Plan()
,ctx.Apply()
, andctx.Destroy()
are called. This results in us hammering the Auth0 API to the point of exceeding the rate limit before a single test case has completed.Steps to Reproduce
KibanaTypeLogzio
test environment.TF_ACC=1 go test -v ./kibana -run TestAccDataSourceKibanaIndex_Basic