Skip to content

Commit

Permalink
PMM-12376 single inventory add endpoint (#2422)
Browse files Browse the repository at this point in the history
* PMM-12376 add a single NodeAdd endpoint

* PMM-12376 add a couple tests for AddNode

* PMM-12376 add more tests

* PMM-12376 remove debug lines

* PMM-12376 format the code

* PMM-12376 address linter errors

* PMM-12376 pass context to transactions

* PMM-12376 add more tests

* PMM-12376 clean up the tests

* PMM-12376 improve the tests

* PMM-12376 re-generate the specs

* PMM-12376 add AddNode to grpc server

* PMM-12376 update the APi documentation

* PMM-12376 update the documentation

* PMM-12376 prefer oneof vs optional

* PMM-12376 update the docs

* PMM-12376 add API tests

* PMM-12376 fix formatting

* PMM-12376 fix API nodes_test

* PMM-12376 fix API tests

* PMM-12376 reindex message props in nodes.proto

Co-authored-by: Artem Gavrilov <[email protected]>

* PMM-12376 use NotEmpty for checking an array

Co-authored-by: Artem Gavrilov <[email protected]>

* PMM-12376 move back the api-tests/server tests

* PMM-12376 running make gen

* PMM-12376 replace NotZerof with NotEmptyf

* PMM-12376 fix the TestContainerNode/Basic API test

---------

Co-authored-by: Artem Gavrilov <[email protected]>
  • Loading branch information
Alex Tymchuk and artemgavrilov authored Sep 13, 2023
1 parent 3c58ed9 commit df3b1aa
Show file tree
Hide file tree
Showing 28 changed files with 5,537 additions and 572 deletions.
15 changes: 15 additions & 0 deletions api-tests/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,21 @@ func AddRemoteNode(t TestingT, nodeName string) *nodes.AddRemoteNodeOKBody {
return res.Payload
}

func AddNode(t TestingT, nodeBody *nodes.AddNodeBody) *nodes.AddNodeOKBody {
t.Helper()

params := &nodes.AddNodeParams{
Body: *nodeBody,
Context: Context,
}

res, err := client.Default.Nodes.AddNode(params)
assert.NoError(t, err)
require.NotNil(t, res)

return res.Payload
}

func AddPMMAgent(t TestingT, nodeID string) *agents.AddPMMAgentOKBody {
t.Helper()

Expand Down
Loading

0 comments on commit df3b1aa

Please sign in to comment.