Velocity icon indicating copy to clipboard operation
Velocity copied to clipboard

Test config and secret file creation

Open hugmanrique opened this issue 3 years ago • 0 comments

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.

hugmanrique avatar Jul 19 '22 13:07 hugmanrique