Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install libfaketime in base Docker image #644

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

matthew-li
Copy link
Collaborator

Description

**** Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. ****

Some functionality may only be tested at certain times of the year. For example, the command start_allocation_period, which runs processing to allocate service units to projects under which renewals were requested, may only be run once the provided period has started.

libfaketime enables the current date and time of the machine to be mocked to test functionality like this beforehand. It had been used before, but had not been incorporated into the Docker development environment.

  • Installed libfaketime in the os Docker image, which is inherited by other images.
  • Updated the documentation on transitioning between allowance years to discuss how to use the tool.

Type of change

**** Please delete options that are not relevant. ****

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

**** Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. ****

  • Re-run the step for rebuilding Docker images on this branch.
  • Follow the instructions in the documentation linked above to run the Docker Compose stack with fake times in some services (e.g., app-shell, web).
  • Within the shell in one of those services, run the date command. Ensure that the outputted date matches the fake time that was set.

PR Self Evaluation

Strikethrough things that don’t make sense for your PR.

  • My code follows the agreed upon best practices
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if needed)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in the appropriate modules
  • I have performed a self-review of my own code

Copy link
Collaborator

@Hzaakk Hzaakk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Haven't checked but I'm assuming running the last RUN step caches properly and doesn't re-run every time we build images.

@matthew-li matthew-li merged commit db54c5f into develop Oct 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants