Skip to content

Make it context aware and add test skipping options through environment variables#11192

Merged
ulyssessouza merged 1 commit intodocker:mainfrom
ulyssessouza:exclude-tests-context
Nov 16, 2023
Merged

Make it context aware and add test skipping options through environment variables#11192
ulyssessouza merged 1 commit intodocker:mainfrom
ulyssessouza:exclude-tests-context

Conversation

@ulyssessouza
Copy link
Copy Markdown
Contributor

What I did

  • Add skipping capability through an environment variable (EXCLUDE_E2E_TESTS).
  • Make e2e context aware

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did
25259092_goat-on-the-grass-scaled-e1618776775566-1662x2048

Comment thread pkg/e2e/framework.go
"testing"
"time"

cp "github.com/otiai10/copy"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder you could use https://github.com/moby/moby/blob/master/daemon/graphdriver/copy/copy.go#L124 as we already depend on moby and this would about an additional dependency

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried but kept on getting a very strange error:

# github.com/docker/docker/pkg/chrootarchive
../../../../pkg/mod/github.com/docker/[email protected]+incompatible/pkg/chrootarchive/archive_unix.go:31:8: undefined: goInChroot
../../../../pkg/mod/github.com/docker/[email protected]+incompatible/pkg/chrootarchive/archive_unix.go:53:8: undefined: goInChroot
../../../../pkg/mod/github.com/docker/[email protected]+incompatible/pkg/chrootarchive/diff_unix.go:45:8: undefined: goInChroot
FAIL    github.com/docker/compose/v2/pkg/e2e [build failed]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd avoid the graphdriver packages as they are really intended for the daemon (and don't have macos implementations)

Perhaps (but typing from my phone) the copy package in fsutils could work? Is this just to copy a directory? https://github.com/tonistiigi/fsutil/tree/master/copy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

right, I just wondered, but that's ok
(I just miss the ability to define test-only dependencies in go.mod. I miss you pom.xml :)

@ulyssessouza ulyssessouza merged commit efea084 into docker:main Nov 16, 2023
@ulyssessouza ulyssessouza deleted the exclude-tests-context branch November 16, 2023 11:25
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