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
// This call will throw an error on Windows systems because of the of// the call x509.SystemCertPool() because system root pool is not// available on Windows so ignore the error for when the tests are run// on the Windows platform during CI_=target.Init(m)
As of Go 1.18 this is not the case for Windows anymore and
we can instead enforce error checking. References:
Given Dapr depends on Go 1.19, we can enforce tests on Init result
and remove this comment.
While enforcing error checking we notice that the code above was
in fact hiding errors in the test setup even in Unix systems:
--- FAIL: TestVaultTokenPrefix (0.01s)
--- FAIL: TestVaultTokenPrefix/if_vaultKVUsePrefix_is_false_ignore_vaultKVPrefix (0.00s)
vault_test.go:174: couldn't read vault token from mount path ./vault.txt err: open ./vault.txt: no such file or directory
--- FAIL: TestVaultTokenMountPathOrVaultTokenRequired (0.00s)
--- FAIL: TestVaultTokenMountPathOrVaultTokenRequired/with_vaultTokenMount (0.00s)
vault_test.go:245: couldn't read vault token from mount path ./vault.txt err: open ./vault.txt: no such file or directory
--- FAIL: TestDefaultVaultAddress (0.00s)
--- FAIL: TestDefaultVaultAddress/with_blank_vaultAddr (0.00s)
vault_test.go:320: couldn't read vault token from mount path ./vault.txt err: open ./vault.txt: no such file or directory
This is just a problem in test setup. I have not observed any impact on the component behavior impacted by this.
Steps to Reproduce the Problem
Replace _ = target.Init(m) with if err := target.Init(m); err != nil {t.Fatal(err) } and run tests in vault_test.go
Release Note
RELEASE NOTE: FIX Improve Hashicorp Vault test setup.
The text was updated successfully, but these errors were encountered:
Tests in vault_test.go had the following :
```go
// This call will throw an error on Windows systems because of the of
// the call x509.SystemCertPool() because system root pool is not
// available on Windows so ignore the error for when the tests are run
// on the Windows platform during CI
_ = target.Init(m)
```
As of Go 1.18 this is not the case for Windows anymore and
we can instead enforce error checking. References:
* golang/go#16736
* golang/go#18609
* rancher/system-agent#84
* jaegertracing/jaeger#2756
Given Dapr depends on Go 1.19, we can enforce tests on `Init` result
and remove this comment.
While enforcing error checking we notice that the code above was
actually hiding errors in the test setup. Component initialization was
ending prematurely due to those errors and the test code was wrongfully
testing for the behavior of a component that has not been successfully
initialized. This is also addressed in this PR.
Closesdapr#2330.
Signed-off-by: Tiago Alves Macambira <[email protected]>
Expected Behavior
Actual Behavior
Tests in
vault_test.go
had the following:As of Go 1.18 this is not the case for Windows anymore and
we can instead enforce error checking. References:
Given Dapr depends on Go 1.19, we can enforce tests on
Init
resultand remove this comment.
While enforcing error checking we notice that the code above was
in fact hiding errors in the test setup even in Unix systems:
This is just a problem in test setup. I have not observed any impact on the component behavior impacted by this.
Steps to Reproduce the Problem
Replace
_ = target.Init(m)
withif err := target.Init(m); err != nil {t.Fatal(err) }
and run tests invault_test.go
Release Note
RELEASE NOTE: FIX Improve Hashicorp Vault test setup.
The text was updated successfully, but these errors were encountered: