File: dtype_test.go

package info (click to toggle)
continuity 0.0~git20180216.d8fb858-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 620 kB
  • sloc: makefile: 46; sh: 28; asm: 3
file content (26 lines) | stat: -rw-r--r-- 947 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package fs

import (
	"testing"

	"github.com/containerd/continuity/testutil"
)

func TestRequiresRootNOP(t *testing.T) {

	// This is a dummy test case that exist to call
	// testutil.RequiresRoot() on non-linux platforms.  This is
	// needed because the Makfile root-coverage tests target
	// determines which packages contain root test by grepping for
	// testutil.RequiresRoot.  Within the fs package, the only test
	// that references this symbol is in dtype_linux_test.go, but
	// that file is only built on linux.  Since the Makefile is not
	// go build tag aware it sees this file and then tries to run
	// the following command on all platforms: "go test ...
	// github.com/containerd/continuity/fs -test.root".  On
	// non-linux platforms this fails because there are no tests in
	// the "fs" package that reference testutil.RequiresRoot.  To
	// fix this problem we'll add a reference to this symbol below.

	testutil.RequiresRoot(t)
}