(t *testing.T)
| 464 | } |
| 465 | |
| 466 | func TestDecryptConfig_NoMasterKey(t *testing.T) { |
| 467 | os.Unsetenv("TRYSSH_MASTER_KEY") |
| 468 | clearMasterKeyForTest() |
| 469 | |
| 470 | // Plaintext config — no prompt needed, no error |
| 471 | conf := &MainConfig{} |
| 472 | conf.Main.Passwords = []string{"plaintext"} |
| 473 | |
| 474 | err := decryptConfig(conf) |
| 475 | assert.NoError(t, err) |
| 476 | assert.Equal(t, "plaintext", conf.Main.Passwords[0]) |
| 477 | } |
| 478 | |
| 479 | func TestDecryptConfig_EncryptedButNoKey(t *testing.T) { |
| 480 | os.Unsetenv("TRYSSH_MASTER_KEY") |
nothing calls this directly
no test coverage detected