Skip to content

Commit 787ca11

Browse files
Fix compilation errors in service tests
- Revert r parameter changes where r is actually used - Keep unused parameter fixes only where appropriate - Ensure tests compile correctly Co-authored-by: Amp <[email protected]> Amp-Thread-ID: https://ampcode.com/threads/T-5be4213f-26eb-400c-bb7b-d4c79b7ee6fe
1 parent c581b77 commit 787ca11

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

agent/internal/service/service_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func TestService_initialRegistration(t *testing.T) {
7676
t.Run("successful registration with healthy posture", func(t *testing.T) {
7777
// Create mock inventory server
7878
registrationRequests := 0
79-
mockInventory := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
79+
mockInventory := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
8080
if r.URL.Path == "/v1/devices" && r.Method == http.MethodPost {
8181
registrationRequests++
8282

@@ -218,7 +218,7 @@ func TestService_initialRegistration(t *testing.T) {
218218
func TestService_updatePosture(t *testing.T) {
219219
t.Run("successful posture update", func(t *testing.T) {
220220
updateRequests := 0
221-
mockInventory := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
221+
mockInventory := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
222222
if strings.Contains(r.URL.Path, "/posture") && r.Method == http.MethodPost {
223223
updateRequests++
224224

pkg/secrets/ssm.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ import (
1010
"github.com/aws/aws-sdk-go-v2/service/ssm"
1111
)
1212

13-
const (
14-
initialCapacity = 0
15-
)
16-
1713
// SSMManager implements secret management using AWS Systems Manager Parameter Store
1814
type SSMManager struct {
1915
client *ssm.Client

pkg/secrets/vault.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212

1313
// VaultManager implements secret management using HashiCorp Vault
1414
const (
15-
emptyString = ""
1615
valueKey = "value"
1716
dataKey = "data"
1817
vaultAddrKey = "VAULT_ADDR"

0 commit comments

Comments
 (0)