I'm trying to make sure that calling soft_purge_surrogate_key() is gated behind a call to fastly_key_is_valid(), to ensure the token is valid to purge the service, but in a viceroy environment (either as a library or a test runner), this call will always return false.
I'd love to be able to pass some magic string value in the fastly-key header to allow integration tests to execute the check and return true, rather than having a code path wrapped in #[cfg(test)] that returns true and avoiding executing the actual hostcall.
I'm trying to make sure that calling
soft_purge_surrogate_key()is gated behind a call tofastly_key_is_valid(), to ensure the token is valid to purge the service, but in a viceroy environment (either as a library or a test runner), this call will always return false.I'd love to be able to pass some magic string value in the
fastly-keyheader to allow integration tests to execute the check and return true, rather than having a code path wrapped in#[cfg(test)]that returns true and avoiding executing the actual hostcall.