Files
threshold/internal
Michael Gaffney 90276b5e91 tests: Set a default job run interval based on the test deadline
The Vault Credential Store only accepts Vault tokens that have a TTL
greater than the internal job scheduler's run frequency. This prevents a
Vault Credential Store from being created with a Vault token that will
expire before Boundary can renew it.

The Vault test server, by default, creates Vault tokens with a TTL equal
to the duration of time remaining until `t.Deadline()` is reached.

This change sets the test controller's default job scheduler duration to
be half of time remaining until `t.Deadline()`. The default job
scheduler duration can still be overridden by setting a duration on
`TestConrollerOpts.SchedulerRunJobInterval`.

This change fixes the error received when running:

    go test -timeout 30s \
      -tags devlicense \
      -run '^TestList$' \
      github.com/hashicorp/boundary/internal/tests/api/credentialstores

Which returned this error:

    {"kind":"Internal",
    "message":"credentialstores.(Service).createInRepo: unable to create
    credential store: vault.(Repository).CreateCredentialStore: unknown,
    unknown: error #0: scheduler interval must be greater than token
    ttl. scheduler jobs interval value: 1m0s"}
2023-10-31 15:00:36 -04:00
..
2023-10-31 10:32:46 -04:00
2023-10-26 11:18:41 -07:00
2023-09-05 13:10:03 -04:00
2023-08-11 10:31:53 -07:00
2023-09-05 13:10:03 -04:00
2023-09-05 13:10:03 -04:00
2023-08-11 10:31:53 -07:00
2023-10-06 08:12:14 -05:00
2023-08-11 10:31:53 -07:00