tests: create all-zero gocryptfs.diriv in resetTmpDir()
Tests were failing because this file was missing
This commit is contained in:
parent
bdd9249a52
commit
798e5eb5e7
@ -15,7 +15,7 @@ const statusTxtContent = "It works!\n"
|
||||
func checkStatusTxt(t *testing.T, filename string) {
|
||||
contentBytes, err := ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
t.Fatal(err)
|
||||
}
|
||||
content := string(contentBytes)
|
||||
if content != statusTxtContent {
|
||||
|
@ -38,6 +38,12 @@ func resetTmpDir() {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
dirIV := make([]byte, 16)
|
||||
err = ioutil.WriteFile(defaultCipherDir + "gocryptfs.diriv", dirIV, 0444)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// mount CIPHERDIR "c" on PLAINDIR "p"
|
||||
|
Loading…
Reference in New Issue
Block a user