Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a040f9831b |
@@ -446,8 +446,6 @@ func TestChangingCommandsWaitForLock(t *testing.T) {
|
||||
// state directory lock by the time it writes its output. Holding it while
|
||||
// streaming would stall every other changing command for as long as the
|
||||
// stream lasts, and forever when the other end of the pipe is one of them.
|
||||
//
|
||||
//nolint:paralleltest // t.Setenv forbids t.Parallel
|
||||
func TestEncryptStreamsUnlocked(t *testing.T) {
|
||||
t.Setenv(secret.EnvMnemonic, testMnemonic)
|
||||
|
||||
@@ -484,6 +482,7 @@ func TestEncryptStreamsUnlocked(t *testing.T) {
|
||||
// Let encrypt finish, so that it releases the lock, then free it
|
||||
// again for the tests that follow
|
||||
_, _ = io.Copy(io.Discard, outputReader)
|
||||
|
||||
(<-taken)()
|
||||
t.Fatal("secret encrypt held the lock while streaming")
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ const currentFile = "current"
|
||||
const unlockerMetadataFile = "unlocker-metadata.json"
|
||||
|
||||
// unlockerPassphrase protects the passphrase unlockers the tests create.
|
||||
//
|
||||
//nolint:gosec // G101: test data, not a real credential
|
||||
const unlockerPassphrase = "unlocker passphrase"
|
||||
|
||||
// hookFs passes every call through to Fs, but first calls before for each
|
||||
@@ -612,8 +614,6 @@ func TestWriteFileAtomicTempFile(t *testing.T) {
|
||||
// vault whose long-term key cannot be had: it must fail without writing
|
||||
// anything, so that it never leaves a partial unlocker, nor breaks the one
|
||||
// it would replace.
|
||||
//
|
||||
//nolint:paralleltest // t.Setenv forbids t.Parallel
|
||||
func TestPassphraseUnlockerGetsKeyFirst(t *testing.T) {
|
||||
// No mnemonic, and no current unlocker to get the key from
|
||||
t.Setenv(secret.EnvMnemonic, "")
|
||||
@@ -640,8 +640,6 @@ func TestPassphraseUnlockerGetsKeyFirst(t *testing.T) {
|
||||
// passphrase unlocker writes in its directory is its metadata: an unlocker
|
||||
// directory without metadata is never used, so one interrupted earlier
|
||||
// cannot be.
|
||||
//
|
||||
//nolint:paralleltest // t.Setenv forbids t.Parallel
|
||||
func TestPassphraseUnlockerWritesMetadataLast(t *testing.T) {
|
||||
t.Setenv(secret.EnvMnemonic, testMnemonic)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user