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

[CI] fix hardcode in TestImageHistory #4083

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

biubiubiuboomboomboom
Copy link

Motivation

Fix hardcoded CreatedSince values in TestImageHistory .

Related Issue

#4067

Change

  • Replaced the fixed string value used in assert.Equal for the CreatedSince field with the value returned by the formatter.TimeSinceInHuman function in relevant unit test cases.

  • Added a unit test case for the formatter.TimeSinceInHuman function .

Others

I noticed that other functions in formatter.go seem to have no unit tests . There may be a risk when these functions are changed .

@biubiubiuboomboomboom biubiubiuboomboomboom changed the title [CI]: fix hardcode in TestImageHistory [CI] fix hardcode in TestImageHistory Apr 4, 2025
Signed-off-by: y.li <[email protected]>
@manugupt1 manugupt1 self-requested a review April 4, 2025 14:48
@biubiubiuboomboomboom biubiubiuboomboomboom marked this pull request as draft April 4, 2025 15:21
@apostasie
Copy link
Contributor

Thanks @biubiubiuboomboomboom

Two nits about using t.Parallel but otherwise looks good.

Signed-off-by: y.li <[email protected]>
@biubiubiuboomboomboom biubiubiuboomboomboom marked this pull request as ready for review April 4, 2025 16:44
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