*_test.go: ignore cyclomatic complexity for test files

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2022-04-08 21:59:08 -04:00
parent 7fed71e221
commit 106c52de51
Signed by: vbatts
GPG Key ID: 10937E57733F1362
6 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,7 @@ func TestCompare(t *testing.T) {
}
}
//gocyclo:ignore
func TestCompareModified(t *testing.T) {
dir, err := ioutil.TempDir("", "test-compare-modified")
if err != nil {
@ -114,6 +115,7 @@ func TestCompareModified(t *testing.T) {
}
}
//gocyclo:ignore
func TestCompareMissing(t *testing.T) {
dir, err := ioutil.TempDir("", "test-compare-missing")
if err != nil {
@ -205,6 +207,7 @@ func TestCompareMissing(t *testing.T) {
}
}
//gocyclo:ignore
func TestCompareExtra(t *testing.T) {
dir, err := ioutil.TempDir("", "test-compare-extra")
if err != nil {
@ -338,6 +341,7 @@ func TestCompareKeys(t *testing.T) {
}
}
//gocyclo:ignore
func TestTarCompare(t *testing.T) {
dir, err := ioutil.TempDir("", "test-compare-tar")
if err != nil {

View File

@ -71,6 +71,7 @@ func (fs *MockFsEval) KeywordFunc(fn KeywordFunc) KeywordFunc {
return fn
}
//gocyclo:ignore
func TestCheckFsEval(t *testing.T) {
dir, err := ioutil.TempDir("", "test-check-fs-eval")
if err != nil {

View File

@ -13,6 +13,7 @@ import (
"github.com/vbatts/go-mtree/xattr"
)
//gocyclo:ignore
func TestXattr(t *testing.T) {
testDir, present := os.LookupEnv("MTREE_TESTDIR")
if present == false {

View File

@ -129,6 +129,7 @@ func TestTar(t *testing.T) {
// `tar -cvf some.tar dir1 dir2 dir3 dir4/dir5 dir6` ... etc.
// The testdata of collection.tar resemble such an archive. the `collection` folder
// is the contents of `collection.tar` extracted
//gocyclo:ignore
func TestArchiveCreation(t *testing.T) {
fh, err := os.Open("./testdata/collection.tar")
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
// 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.
//gocyclo:ignore
func TestTreeTraversal(t *testing.T) {
fh, err := os.Open("./testdata/traversal.tar")
if err != nil {

View File

@ -15,6 +15,7 @@ func init() {
//logrus.SetLevel(logrus.DebugLevel)
}
//gocyclo:ignore
func TestXattrUpdate(t *testing.T) {
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

View File

@ -1,3 +1,4 @@
//go:build go1.7
// +build go1.7
package mtree
@ -20,6 +21,7 @@ func init() {
logrus.SetLevel(logrus.DebugLevel)
}
//gocyclo:ignore
func TestUpdate(t *testing.T) {
content := []byte("I know half of you half as well as I ought to")
dir, err := ioutil.TempDir("", "test-check-keywords")