containerd / continuity

A transport-agnostic, filesystem metadata manifest system
https://containerd.io
Apache License 2.0
139 stars 67 forks source link

split testutil/loopback_linux.go to another pkg #136

Closed AkihiroSuda closed 5 years ago

AkihiroSuda commented 5 years ago

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 suda.akihiro@lab.ntt.co.jp

crosbymichael commented 5 years ago

LGTM