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

split testutil/loopback_linux.go to another pkg #136

Merged
merged 1 commit into from
Oct 1, 2018

Conversation

AkihiroSuda
Copy link
Member

containerd/containerd#2694 is going to import both containerd/pkg/testutil and
continuity/testutil for deduplicating NewLoopback().

However, as the both pkg defines test.root BoolVar in init(), the test panics.

This commit avoids the panic issue by splitting continuity/testutil/loopback_linux.go
to another pkg (continuity/testutil/loopback), so taht containerd does not need to import
both containerd/pkg/testutil and continuity/testutil.
i.e. containerd will import containerd/pkg/testutil and continuity/testutil/loopback.

Signed-off-by: Akihiro Suda [email protected]

containerd/containerd#2694 is going to import both `containerd/pkg/testutil` and
`continuity/testutil` for deduplicating `NewLoopback()`.

However, as the both pkg defines `test.root` BoolVar in `init()`, the test panics.

This commit avoids the panic issue by splitting `continuity/testutil/loopback_linux.go`
to another pkg (`continuity/testutil/loopback`), so taht containerd does not need to import
both `containerd/pkg/testutil` and `continuity/testutil`.
i.e. containerd will import `containerd/pkg/testutil` and `continuity/testutil/loopback`.

Signed-off-by: Akihiro Suda <[email protected]>
@crosbymichael
Copy link
Member

LGTM

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit bd77b46 into containerd:master Oct 1, 2018
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