diff --git a/cmd/spectre/main_test.go b/cmd/spectre/main_test.go index 65ea73f67e89139cf1a6dad30f25a248a1c1eadf..893b7d54581fd5d7e5f66ac128b5c665a52bc147 100644 --- a/cmd/spectre/main_test.go +++ b/cmd/spectre/main_test.go @@ -2,7 +2,6 @@ package main import ( _ "embed" - "os" "testing" "go.jolheiser.com/go-spectre/testdata" @@ -16,8 +15,6 @@ if err != nil { t.Log(err) t.FailNow() } - - tmp := t.TempDir() for _, tc := range cases { t.Run(tc.ID, func(t *testing.T) { @@ -33,32 +30,6 @@ tc.SiteName, } pw, err := maine(args) - if err != nil { - t.Log(err) - t.FailNow() - } - - if pw != tc.Result { - t.Log("passwords did not match") - t.Fail() - } - - // Test with secret-file as well - sf, err := os.CreateTemp(tmp, "spectre*") - if err != nil { - t.Log(err) - t.FailNow() - } - defer sf.Close() - if _, err := sf.WriteString(tc.UserSecret); err != nil { - t.Log(err) - t.FailNow() - } - - args[3] = "" // --secret - args[5] = sf.Name() // --secret-file - - pw, err = maine(args) if err != nil { t.Log(err) t.FailNow()