Skip to content

[CI] fix hardcode in TestImageHistory #4083

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

Merged

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
@fahedouch fahedouch added this to the v2.0.5 milestone Apr 6, 2025
Copy link
Member

@fahedouch fahedouch left a comment

Choose a reason for hiding this comment

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

Thanks

@fahedouch fahedouch merged commit 0dd3552 into containerd:main Apr 6, 2025
30 checks 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.

3 participants