You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to control the current date and time in full system tests, for reproducible tests and to test edge cases around dates (e.g. leap days).
Solution I see
An API within aidbox, to set / clear a fixed time value. This value should be used throughout the application instead of the current date and time. This API should be enabled by a feature flag and not available in production deployments.
Alternatives I've considered, but they don't work
libfaketime installed on the postgresql server, however this causes some other issues with postgres, since any functions getting the date and time are affected, which affects scheduling behaviour, logging, which I don't want to interfere with. I want to affect only application-level data (e.g. created date and time on .Meta elements).
Patching postgres to introduce an API for controlling the current date and time. This would be very difficult to maintain.
Intercepting queries issues from aidbox and transforming them to fix the date and time. This is also difficult to maintain.
Additional context
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Please make sure you've added all the necessary details including clear description and severity level.
Problem I need to solve
I want to control the current date and time in full system tests, for reproducible tests and to test edge cases around dates (e.g. leap days).
Solution I see
An API within aidbox, to set / clear a fixed time value. This value should be used throughout the application instead of the current date and time. This API should be enabled by a feature flag and not available in production deployments.
Alternatives I've considered, but they don't work
libfaketime installed on the postgresql server, however this causes some other issues with postgres, since any functions getting the date and time are affected, which affects scheduling behaviour, logging, which I don't want to interfere with. I want to affect only application-level data (e.g. created date and time on .Meta elements).
Patching postgres to introduce an API for controlling the current date and time. This would be very difficult to maintain.
Intercepting queries issues from aidbox and transforming them to fix the date and time. This is also difficult to maintain.
Additional context
The text was updated successfully, but these errors were encountered: