1/*
2   Copyright The containerd Authors.
3
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15*/
16
17package fs
18
19import (
20	"testing"
21
22	"github.com/containerd/continuity/testutil"
23)
24
25func TestRequiresRootNOP(t *testing.T) {
26
27	// This is a dummy test case that exist to call
28	// testutil.RequiresRoot() on non-linux platforms.  This is
29	// needed because the Makfile root-coverage tests target
30	// determines which packages contain root test by grepping for
31	// testutil.RequiresRoot.  Within the fs package, the only test
32	// that references this symbol is in dtype_linux_test.go, but
33	// that file is only built on linux.  Since the Makefile is not
34	// go build tag aware it sees this file and then tries to run
35	// the following command on all platforms: "go test ...
36	// github.com/containerd/continuity/fs -test.root".  On
37	// non-linux platforms this fails because there are no tests in
38	// the "fs" package that reference testutil.RequiresRoot.  To
39	// fix this problem we'll add a reference to this symbol below.
40
41	testutil.RequiresRoot(t)
42}
43