aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cli/cli_test.go8
-rw-r--r--tests/plaintextnames/plaintextnames_test.go4
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/cli/cli_test.go b/tests/cli/cli_test.go
index c7752f2..9eebc5f 100644
--- a/tests/cli/cli_test.go
+++ b/tests/cli/cli_test.go
@@ -16,6 +16,8 @@ import (
"github.com/rfjakob/gocryptfs/tests/test_helpers"
)
+var testPw = []byte("test")
+
func TestMain(m *testing.M) {
test_helpers.ResetTmpDir(false)
r := m.Run()
@@ -25,7 +27,7 @@ func TestMain(m *testing.M) {
// Test -init flag
func TestInit(t *testing.T) {
dir := test_helpers.InitFS(t)
- _, c, err := configfile.LoadConfFile(dir+"/"+configfile.ConfDefaultName, "test")
+ _, c, err := configfile.LoadConfFile(dir+"/"+configfile.ConfDefaultName, testPw)
if err != nil {
t.Fatal(err)
}
@@ -42,7 +44,7 @@ func TestInitDevRandom(t *testing.T) {
// Test -init with -aessiv
func TestInitAessiv(t *testing.T) {
dir := test_helpers.InitFS(t, "-aessiv")
- _, c, err := configfile.LoadConfFile(dir+"/"+configfile.ConfDefaultName, "test")
+ _, c, err := configfile.LoadConfFile(dir+"/"+configfile.ConfDefaultName, testPw)
if err != nil {
t.Fatal(err)
}
@@ -54,7 +56,7 @@ func TestInitAessiv(t *testing.T) {
// Test -init with -reverse
func TestInitReverse(t *testing.T) {
dir := test_helpers.InitFS(t, "-reverse")
- _, c, err := configfile.LoadConfFile(dir+"/"+configfile.ConfReverseName, "test")
+ _, c, err := configfile.LoadConfFile(dir+"/"+configfile.ConfReverseName, testPw)
if err != nil {
t.Fatal(err)
}
diff --git a/tests/plaintextnames/plaintextnames_test.go b/tests/plaintextnames/plaintextnames_test.go
index cda5149..6b513aa 100644
--- a/tests/plaintextnames/plaintextnames_test.go
+++ b/tests/plaintextnames/plaintextnames_test.go
@@ -15,6 +15,8 @@ import (
var cDir string
var pDir string
+var testPw = []byte("test")
+
// Create and mount "-plaintextnames" fs
func TestMain(m *testing.M) {
cDir = test_helpers.InitFS(nil, "-plaintextnames")
@@ -27,7 +29,7 @@ func TestMain(m *testing.M) {
// Only the PlaintextNames feature flag should be set
func TestFlags(t *testing.T) {
- _, cf, err := configfile.LoadConfFile(cDir+"/gocryptfs.conf", "test")
+ _, cf, err := configfile.LoadConfFile(cDir+"/gocryptfs.conf", testPw)
if err != nil {
t.Fatal(err)
}