diff options
Diffstat (limited to 'actions/context_test.go')
| -rw-r--r-- | actions/context_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/actions/context_test.go b/actions/context_test.go index 593518f..6e28857 100644 --- a/actions/context_test.go +++ b/actions/context_test.go @@ -1,5 +1,5 @@ /* - * config_test.go - tests for creating new contexts + * context_test.go - tests for creating new contexts * * Copyright 2017 Google Inc. * Author: Joe Richey (joerichey@google.com) @@ -27,6 +27,7 @@ import ( "testing" "time" + "github.com/google/fscrypt/filesystem" "github.com/google/fscrypt/util" "github.com/pkg/errors" ) @@ -47,12 +48,13 @@ func setupContext() (ctx *Context, err error) { ConfigFileLocation = filepath.Join(mountpoint, "test.conf") // Should not be able to setup without a config file + os.Remove(ConfigFileLocation) if badCtx, badCtxErr := NewContextFromMountpoint(mountpoint, nil); badCtxErr == nil { badCtx.Mount.RemoveAllMetadata() return nil, fmt.Errorf("created context at %q without config file", badCtx.Mount.Path) } - if err = CreateConfigFile(testTime, true); err != nil { + if err = CreateConfigFile(testTime, 0); err != nil { return nil, err } defer func() { @@ -66,7 +68,7 @@ func setupContext() (ctx *Context, err error) { return nil, err } - return ctx, ctx.Mount.Setup() + return ctx, ctx.Mount.Setup(filesystem.WorldWritable) } // Cleans up the testing config file and testing filesystem data. |