summaryrefslogtreecommitdiff
path: root/internal/configfile/config_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-03-05 18:13:56 +0100
committerJakob Unterwurzacher2017-03-05 18:13:56 +0100
commitdecda6d2559192b09289b5328b9446d2b6fa7ce0 (patch)
treec6f57c4786faad3813703500501ab948d4ee463a /internal/configfile/config_test.go
parentb7328815183b7a4ff37156085fb78e8e86aff165 (diff)
configfile: switch on Raw64 by default
As we have dropped Go 1.4 compatibility already, and will add a new feature flag for gocryptfs v1.3 anyway, this is a good time to enable Raw64 as well.
Diffstat (limited to 'internal/configfile/config_test.go')
-rw-r--r--internal/configfile/config_test.go24
1 files changed, 7 insertions, 17 deletions
diff --git a/internal/configfile/config_test.go b/internal/configfile/config_test.go
index 5a16533..7899dac 100644
--- a/internal/configfile/config_test.go
+++ b/internal/configfile/config_test.go
@@ -60,18 +60,22 @@ func TestLoadV2StrangeFeature(t *testing.T) {
}
func TestCreateConfFile(t *testing.T) {
- err := CreateConfFile("config_test/tmp.conf", "test", false, 10, "test", false, false)
+ err := CreateConfFile("config_test/tmp.conf", "test", false, 10, "test", false)
if err != nil {
t.Fatal(err)
}
- _, _, err = LoadConfFile("config_test/tmp.conf", "test")
+ _, c, err := LoadConfFile("config_test/tmp.conf", "test")
if err != nil {
t.Fatal(err)
}
+ // Raw64 is set by default since gocryptfs v1.3
+ if !c.IsFeatureFlagSet(FlagRaw64) {
+ t.Error("FlagRaw64 flag should be set but is not")
+ }
}
func TestCreateConfFileAESSIV(t *testing.T) {
- err := CreateConfFile("config_test/tmp.conf", "test", false, 10, "test", true, false)
+ err := CreateConfFile("config_test/tmp.conf", "test", false, 10, "test", true)
if err != nil {
t.Fatal(err)
}
@@ -84,20 +88,6 @@ func TestCreateConfFileAESSIV(t *testing.T) {
}
}
-func TestCreateConfFileRaw64(t *testing.T) {
- err := CreateConfFile("config_test/tmp.conf", "test", false, 10, "test", false, true)
- if err != nil {
- t.Fatal(err)
- }
- _, c, err := LoadConfFile("config_test/tmp.conf", "test")
- if err != nil {
- t.Fatal(err)
- }
- if !c.IsFeatureFlagSet(FlagRaw64) {
- t.Error("FlagRaw64 flag should be set but is not")
- }
-}
-
func TestIsFeatureFlagKnown(t *testing.T) {
// Test a few hardcoded values
testKnownFlags := []string{"DirIV", "PlaintextNames", "EMENames", "GCMIV128", "LongNames", "AESSIV"}