Skip to content

Commit

Permalink
PMM-7 Fix agent API test (#3177)
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff authored Aug 28, 2024
1 parent c7fe1b2 commit 11cba1b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions api-tests/management/services/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"
"time"

"github.com/AlekSi/pointer"
"github.com/stretchr/testify/require"

pmmapitests "github.com/percona/pmm/api-tests"
Expand All @@ -33,14 +32,14 @@ func TestListAgentVersions(t *testing.T) {
t.Cleanup(func() { cancel() })

t.Run("PMM Agent needs no update", func(t *testing.T) {
listAgentVersionsOK, err := client.Default.ManagementService.ListAgentVersions(
resp, err := client.Default.ManagementService.ListAgentVersions(
&mgmtSvc.ListAgentVersionsParams{
Context: ctx,
})
require.NoError(t, err)
require.Len(t, listAgentVersionsOK.Payload.AgentVersions, 1)
require.Len(t, resp.Payload.AgentVersions, 1)

expected := pointer.ToString(mgmtSvc.ListAgentVersionsOKBodyAgentVersionsItems0SeverityUPDATESEVERITYUPTODATE)
require.Equal(t, expected, listAgentVersionsOK.Payload.AgentVersions[0].Severity)
expected := mgmtSvc.ListAgentVersionsOKBodyAgentVersionsItems0SeverityUPDATESEVERITYUPTODATE
require.Equal(t, expected, *resp.Payload.AgentVersions[0].Severity)
})
}

0 comments on commit 11cba1b

Please sign in to comment.