Velocity
Velocity copied to clipboard
Test config and secret file creation
Per the discussion on #798, I believe these test for the expected behavior by users.
Right now the following are failing
doesNotCreateSecretFileWhenEnvVarIsSet: Velocity creates the secret file even if unused.recreatesSecretFileWhenEmpty: the secret used is the empty array, instead of creating a new secret.createsSecretFileWhenMissing: Velocity throws the exception "The forwarding-secret-file does not exist".
I found two libraries for overriding environment variables with junit, system-stubs and junit-pioneer. They are both maintained, but even if the latter includes other unrelated utilities, the former requires mockito-inline (not core) and I couldn't get it to work reliably. Once #798 is merged, I will re-test and make another PR with fixes if some of the above still fail.