From 2720cd7b0d2711101b841c06e0068d5d3ae1b59e Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 27 Jun 2016 21:39:02 +0200 Subject: tests: give "-plaintextnames" its own test package ...and add tests for checking that gocryptfs.diriv does not get created. The main "integration_tests" package has become quite big and convoluted over time. This small separate package should make writing tests for "-plaintextnames" easier. As seen in "fusefrontend: fix PlaintextNames versions of Mkdir, Rmdir", we need more of them. --- tests/integration_tests/cli_test.go | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'tests/integration_tests/cli_test.go') diff --git a/tests/integration_tests/cli_test.go b/tests/integration_tests/cli_test.go index 0246901..679a5c1 100644 --- a/tests/integration_tests/cli_test.go +++ b/tests/integration_tests/cli_test.go @@ -9,7 +9,6 @@ import ( "testing" "github.com/rfjakob/gocryptfs/internal/configfile" - "github.com/rfjakob/gocryptfs/internal/nametransform" "github.com/rfjakob/gocryptfs/tests/test_helpers" ) @@ -79,30 +78,6 @@ func TestInitConfig(t *testing.T) { } } -// Test -init -plaintextnames -func TestInitPlaintextNames(t *testing.T) { - dir := test_helpers.InitFS(t, "-plaintextnames") - dir = dir + "/" - _, err := os.Stat(dir + configfile.ConfDefaultName) - if err != nil { - t.Fatal(err) - } - _, err = os.Stat(dir + nametransform.DirIVFilename) - if err == nil { - t.Errorf("gocryptfs.diriv should not have been created with -plaintextnames") - } - _, cf, err := configfile.LoadConfFile(dir+configfile.ConfDefaultName, "test") - if err != nil { - t.Fatal(err) - } - if !cf.IsFeatureFlagSet(configfile.FlagPlaintextNames) { - t.Error("PlaintextNames flag should be set but isnt") - } - if cf.IsFeatureFlagSet(configfile.FlagEMENames) || cf.IsFeatureFlagSet(configfile.FlagDirIV) { - t.Error("FlagEMENames and FlagDirIV should be not set") - } -} - // Test -ro func TestRo(t *testing.T) { dir := test_helpers.InitFS(t) -- cgit v1.2.3