Skip to content

Commit

Permalink
PMM-7 Fix agent API test
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Aug 23, 2024
1 parent 5883e93 commit b853be9
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 b853be9

Please sign in to comment.