Fixes inconsistent EXPIRE when ran with flags XX, LT-XX and GT on a key without ttl
closes #509 #508 #507
RCA: The EXPIRE command correctly returned 0 or 1 based on whether it should set the expiration for a key, but it still unconditionally set the expiration regardless of the return value, which caused the errors.
Resolution: I have fixed this issue by ensuring the expiration is updated conditionally, based on the flags passed and the existing expiration of the key. Additionally, I updated the integration tests to include a call to the TTL command to verify that the expiration is accurate, alongside the response code returned by the previous EXPIRE command.
The attached output of the tcl test confirms the behavior is correct now. tcltest-output.log
Thanks for the fixes @jainam2907! Thanks for the reviews @lucifercr07.