Skip to content

Assume /src/pkg/compose/testdata absolute workingdir to make tests reproducible#11212

Merged
ndeloof merged 1 commit intodocker:mainfrom
ndeloof:fix_abspath_label
Nov 21, 2023
Merged

Assume /src/pkg/compose/testdata absolute workingdir to make tests reproducible#11212
ndeloof merged 1 commit intodocker:mainfrom
ndeloof:fix_abspath_label

Conversation

@ndeloof
Copy link
Copy Markdown
Contributor

@ndeloof ndeloof commented Nov 21, 2023

tests ran inside a container by CI actually have /src as root, but when ran on developer's workstation filepath.Abs resolves to a non-portable path, and this makes the assertion fail (https://github.com/docker/compose/blob/main/pkg/compose/ps_test.go#L61).

What I did
assume working dir is /src for tests to get a reproducible absolute path

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0ab21a2) 56.83% compared to head (65f9b0b) 56.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11212      +/-   ##
==========================================
+ Coverage   56.83%   56.86%   +0.03%     
==========================================
  Files         133      133              
  Lines       11486    11486              
==========================================
+ Hits         6528     6532       +4     
+ Misses       4321     4318       -3     
+ Partials      637      636       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ndeloof ndeloof merged commit b1a26da into docker:main Nov 21, 2023
@ndeloof ndeloof deleted the fix_abspath_label branch November 21, 2023 15:11
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