mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-24 09:05:39 +00:00
*_test.go: ignore cyclomatic complexity for test files
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
7fed71e221
commit
106c52de51
6 changed files with 11 additions and 0 deletions
|
@ -35,6 +35,7 @@ func TestCompare(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//gocyclo:ignore
|
||||||
func TestCompareModified(t *testing.T) {
|
func TestCompareModified(t *testing.T) {
|
||||||
dir, err := ioutil.TempDir("", "test-compare-modified")
|
dir, err := ioutil.TempDir("", "test-compare-modified")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -114,6 +115,7 @@ func TestCompareModified(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//gocyclo:ignore
|
||||||
func TestCompareMissing(t *testing.T) {
|
func TestCompareMissing(t *testing.T) {
|
||||||
dir, err := ioutil.TempDir("", "test-compare-missing")
|
dir, err := ioutil.TempDir("", "test-compare-missing")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -205,6 +207,7 @@ func TestCompareMissing(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//gocyclo:ignore
|
||||||
func TestCompareExtra(t *testing.T) {
|
func TestCompareExtra(t *testing.T) {
|
||||||
dir, err := ioutil.TempDir("", "test-compare-extra")
|
dir, err := ioutil.TempDir("", "test-compare-extra")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -338,6 +341,7 @@ func TestCompareKeys(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//gocyclo:ignore
|
||||||
func TestTarCompare(t *testing.T) {
|
func TestTarCompare(t *testing.T) {
|
||||||
dir, err := ioutil.TempDir("", "test-compare-tar")
|
dir, err := ioutil.TempDir("", "test-compare-tar")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -71,6 +71,7 @@ func (fs *MockFsEval) KeywordFunc(fn KeywordFunc) KeywordFunc {
|
||||||
return fn
|
return fn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//gocyclo:ignore
|
||||||
func TestCheckFsEval(t *testing.T) {
|
func TestCheckFsEval(t *testing.T) {
|
||||||
dir, err := ioutil.TempDir("", "test-check-fs-eval")
|
dir, err := ioutil.TempDir("", "test-check-fs-eval")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -13,6 +13,7 @@ import (
|
||||||
"github.com/vbatts/go-mtree/xattr"
|
"github.com/vbatts/go-mtree/xattr"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//gocyclo:ignore
|
||||||
func TestXattr(t *testing.T) {
|
func TestXattr(t *testing.T) {
|
||||||
testDir, present := os.LookupEnv("MTREE_TESTDIR")
|
testDir, present := os.LookupEnv("MTREE_TESTDIR")
|
||||||
if present == false {
|
if present == false {
|
||||||
|
|
|
@ -129,6 +129,7 @@ func TestTar(t *testing.T) {
|
||||||
// `tar -cvf some.tar dir1 dir2 dir3 dir4/dir5 dir6` ... etc.
|
// `tar -cvf some.tar dir1 dir2 dir3 dir4/dir5 dir6` ... etc.
|
||||||
// The testdata of collection.tar resemble such an archive. the `collection` folder
|
// The testdata of collection.tar resemble such an archive. the `collection` folder
|
||||||
// is the contents of `collection.tar` extracted
|
// is the contents of `collection.tar` extracted
|
||||||
|
//gocyclo:ignore
|
||||||
func TestArchiveCreation(t *testing.T) {
|
func TestArchiveCreation(t *testing.T) {
|
||||||
fh, err := os.Open("./testdata/collection.tar")
|
fh, err := os.Open("./testdata/collection.tar")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -197,6 +198,7 @@ func TestArchiveCreation(t *testing.T) {
|
||||||
// evaluated. Also, The fact that this archive contains a single entry, yet the
|
// evaluated. Also, The fact that this archive contains a single entry, yet the
|
||||||
// entry is associated with a file that has parent directories, means that the
|
// entry is associated with a file that has parent directories, means that the
|
||||||
// "." directory should be the lowest sub-directory under which `file` is contained.
|
// "." directory should be the lowest sub-directory under which `file` is contained.
|
||||||
|
//gocyclo:ignore
|
||||||
func TestTreeTraversal(t *testing.T) {
|
func TestTreeTraversal(t *testing.T) {
|
||||||
fh, err := os.Open("./testdata/traversal.tar")
|
fh, err := os.Open("./testdata/traversal.tar")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -15,6 +15,7 @@ func init() {
|
||||||
//logrus.SetLevel(logrus.DebugLevel)
|
//logrus.SetLevel(logrus.DebugLevel)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//gocyclo:ignore
|
||||||
func TestXattrUpdate(t *testing.T) {
|
func TestXattrUpdate(t *testing.T) {
|
||||||
content := []byte("I know half of you half as well as I ought to")
|
content := []byte("I know half of you half as well as I ought to")
|
||||||
// a bit dirty to create/destroy a directory in cwd, but often /tmp is
|
// a bit dirty to create/destroy a directory in cwd, but often /tmp is
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build go1.7
|
||||||
// +build go1.7
|
// +build go1.7
|
||||||
|
|
||||||
package mtree
|
package mtree
|
||||||
|
@ -20,6 +21,7 @@ func init() {
|
||||||
logrus.SetLevel(logrus.DebugLevel)
|
logrus.SetLevel(logrus.DebugLevel)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//gocyclo:ignore
|
||||||
func TestUpdate(t *testing.T) {
|
func TestUpdate(t *testing.T) {
|
||||||
content := []byte("I know half of you half as well as I ought to")
|
content := []byte("I know half of you half as well as I ought to")
|
||||||
dir, err := ioutil.TempDir("", "test-check-keywords")
|
dir, err := ioutil.TempDir("", "test-check-keywords")
|
||||||
|
|
Loading…
Reference in a new issue