fix: replace unused parameters with underscores (revive)
- Replace unused function parameters with _ in test files - Affects version_test.go, debug_test.go, and pgpunlock_test.go
This commit is contained in:
parent
5ed850196b
commit
eb19fa4b97
@ -102,16 +102,16 @@ func TestDebugFunctions(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Test that debug functions don't panic and can be called
|
// Test that debug functions don't panic and can be called
|
||||||
t.Run("Debug", func(t *testing.T) {
|
t.Run("Debug", func(_ *testing.T) {
|
||||||
Debug("test debug message")
|
Debug("test debug message")
|
||||||
Debug("test with args", "key", "value", "number", 42)
|
Debug("test with args", "key", "value", "number", 42)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("DebugF", func(t *testing.T) {
|
t.Run("DebugF", func(_ *testing.T) {
|
||||||
DebugF("formatted message: %s %d", "test", 123)
|
DebugF("formatted message: %s %d", "test", 123)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("DebugWith", func(t *testing.T) {
|
t.Run("DebugWith", func(_ *testing.T) {
|
||||||
DebugWith("structured message",
|
DebugWith("structured message",
|
||||||
slog.String("string_key", "string_value"),
|
slog.String("string_key", "string_value"),
|
||||||
slog.Int("int_key", 42),
|
slog.Int("int_key", 42),
|
||||||
|
@ -28,7 +28,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// setupNonInteractiveGPG creates a custom GPG environment for testing
|
// setupNonInteractiveGPG creates a custom GPG environment for testing
|
||||||
func setupNonInteractiveGPG(t *testing.T, tempDir, passphrase, gnupgHomeDir string) {
|
func setupNonInteractiveGPG(t *testing.T, _, passphrase, gnupgHomeDir string) {
|
||||||
// Create GPG config file for non-interactive operation
|
// Create GPG config file for non-interactive operation
|
||||||
gpgConfPath := filepath.Join(gnupgHomeDir, "gpg.conf")
|
gpgConfPath := filepath.Join(gnupgHomeDir, "gpg.conf")
|
||||||
gpgConfContent := `batch
|
gpgConfContent := `batch
|
||||||
|
@ -58,7 +58,7 @@ func (m *MockVersionVault) GetDirectory() (string, error) {
|
|||||||
return filepath.Join(m.stateDir, "vaults.d", m.Name), nil
|
return filepath.Join(m.stateDir, "vaults.d", m.Name), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MockVersionVault) AddSecret(name string, value []byte, force bool) error {
|
func (m *MockVersionVault) AddSecret(_ string, _ []byte, _ bool) error {
|
||||||
return fmt.Errorf("not implemented in mock")
|
return fmt.Errorf("not implemented in mock")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ func (m *MockVersionVault) GetCurrentUnlocker() (Unlocker, error) {
|
|||||||
return nil, fmt.Errorf("not implemented in mock")
|
return nil, fmt.Errorf("not implemented in mock")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MockVersionVault) CreatePassphraseUnlocker(passphrase string) (*PassphraseUnlocker, error) {
|
func (m *MockVersionVault) CreatePassphraseUnlocker(_ string) (*PassphraseUnlocker, error) {
|
||||||
return nil, fmt.Errorf("not implemented in mock")
|
return nil, fmt.Errorf("not implemented in mock")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user