Skip to content

Commit

Permalink
PMM-12913 fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Mar 22, 2024
1 parent 731f650 commit b7a6094
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions admin/commands/inventory/remove_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package inventory

import (
"github.com/AlekSi/pointer"

"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/api/inventory/v1/json/client"
agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service"
Expand Down
4 changes: 2 additions & 2 deletions managed/models/agent_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func TestAgentHelpers(t *testing.T) {

agent, err = models.RemoveAgent(q, "A0", models.RemoveRestrict)
assert.Nil(t, agent)
tests.AssertGRPCError(t, status.New(codes.NotFound, `Agent with ID "A0" not found.`), err)
tests.AssertGRPCError(t, status.New(codes.NotFound, `Agent with ID A0 not found.`), err)

agent, err = models.RemoveAgent(q, "A1", models.RemoveRestrict)
assert.Nil(t, agent)
Expand All @@ -406,7 +406,7 @@ func TestAgentHelpers(t *testing.T) {
assert.Equal(t, expected, agent)
assert.NoError(t, err)
_, err = models.FindAgentByID(q, "A1")
tests.AssertGRPCError(t, status.New(codes.NotFound, `Agent with ID "A1" not found.`), err)
tests.AssertGRPCError(t, status.New(codes.NotFound, `Agent with ID A1 not found.`), err)
})

t.Run("FindPMMAgentsForNode", func(t *testing.T) {
Expand Down

0 comments on commit b7a6094

Please sign in to comment.