Got a few warnings from my IDE about redundant type conversions,
so I decided to look into it. Added the unconvert linter to our
checks, and fixed the violations. Added two ignore comments as I
wasn't sure about whether they'd change the semantics of the code.
Signed-off-by: Anders Eknert <anders@eknert.com>
This commit eliminates the potential for a slow disk write to cause a test failure in the certificate rotation tests by adding a file `Sync()` call in the function used to copy certificate files around.
Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
* sdk/opa_test: increase max delta
6ms was arbitrary, and so is 10ms.
When GHA switched the macos-latest version, we've started seeing
test flakiness here.
30ms (20ms+10ms) are still waaaay below the 1s that the test_plugin
attempts need to shut down.
* test/e2e/certrefresh: double wait time for macos runner
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
This adds a new flag to `opa run`, intended for server usage with HTTPS listeners:
`--tls-cert-refresh-period`. If used with a positive duration, such as "5m" (5 minutes),
"24h", etc, the server will track the certificate and key files' contents. When their
content changes, the certificates will be reloaded.
On an error in reloading, it will log (info) the error and try again in the next round.
Fixes#2500.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>