summaryrefslogtreecommitdiff
path: root/integration_tests
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-14 17:16:17 +0100
committerJakob Unterwurzacher2015-11-14 17:16:17 +0100
commit61aacb5c1bd3368366484b9e03cf90ccf85f1125 (patch)
treed62d9fed9fb500a6051e2b4919a094fd1556de24 /integration_tests
parentf9c21e91aab4799425b25f5fb876c9d95865d9dc (diff)
Run go fmt and go vet
Diffstat (limited to 'integration_tests')
-rw-r--r--integration_tests/helpers.go10
-rw-r--r--integration_tests/main_test.go7
-rw-r--r--integration_tests/performance_test.go4
3 files changed, 11 insertions, 10 deletions
diff --git a/integration_tests/helpers.go b/integration_tests/helpers.go
index 9bfd9fc..fdad28b 100644
--- a/integration_tests/helpers.go
+++ b/integration_tests/helpers.go
@@ -1,17 +1,19 @@
package integration_tests
import (
- "os"
- "os/exec"
- "fmt"
- "io/ioutil"
"crypto/md5"
"encoding/hex"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "os/exec"
"testing"
)
const tmpDir = "/tmp/gocryptfs_main_test/"
+
// Mountpoint
+// Note: the code assumes that both have a trailing slash!
const plainDir = tmpDir + "plain/"
const cipherDir = tmpDir + "cipher/"
diff --git a/integration_tests/main_test.go b/integration_tests/main_test.go
index 222c192..6049646 100644
--- a/integration_tests/main_test.go
+++ b/integration_tests/main_test.go
@@ -1,10 +1,10 @@
package integration_tests
import (
- "flag"
"bytes"
"crypto/md5"
"encoding/hex"
+ "flag"
"fmt"
"io/ioutil"
"os"
@@ -33,7 +33,6 @@ func TestMain(m *testing.M) {
os.Exit(r)
}
-
if testing.Verbose() {
fmt.Printf("***** Testing with native Go crypto\n")
}
@@ -278,7 +277,7 @@ func TestFiltered(t *testing.T) {
filteredFile := plainDir + "gocryptfs.conf"
file, err := os.Create(filteredFile)
if plaintextNames == true && err == nil {
- fmt.Errorf("should have failed but didn't")
+ t.Errorf("should have failed but didn't")
} else if plaintextNames == false && err != nil {
t.Error(err)
}
@@ -286,7 +285,7 @@ func TestFiltered(t *testing.T) {
err = os.Remove(filteredFile)
if plaintextNames == true && err == nil {
- fmt.Errorf("should have failed but didn't")
+ t.Errorf("should have failed but didn't")
} else if plaintextNames == false && err != nil {
t.Error(err)
}
diff --git a/integration_tests/performance_test.go b/integration_tests/performance_test.go
index e46cb91..b24474c 100644
--- a/integration_tests/performance_test.go
+++ b/integration_tests/performance_test.go
@@ -1,10 +1,10 @@
package integration_tests
import (
- "io/ioutil"
- "os"
"fmt"
"io"
+ "io/ioutil"
+ "os"
"testing"
)