vendredi 1 mars 2019

On Linux, is there a way to simulate change of system date/time for unit-testing purposes?

I use gitlab-ci to run my test suite, in one test I would like to simulate a change of system date (like, going to the day after) in order to see if everything works as expected, for example:

  • redis keys are deleted (TTL)
  • some files are written with a new 'run number' since the date as changed
  • date and time calculation are ok
  • ...

Is there a tool for this ?

Aucun commentaire:

Enregistrer un commentaire