Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

PMM 9029: api tests: Connect to real DB for tests #1149

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ShashankSinha252
Copy link
Contributor

@ShashankSinha252 ShashankSinha252 changed the title api tests: Connect to real DB for tests PMM 9029: api tests: Connect to real DB for tests Jun 13, 2022
@codecov
Copy link

codecov bot commented Jun 13, 2022

Codecov Report

Merging #1149 (0dea6c6) into main (ec60eb4) will decrease coverage by 0.23%.
The diff coverage is 39.41%.

@@            Coverage Diff             @@
##             main    #1149      +/-   ##
==========================================
- Coverage   49.29%   49.06%   -0.24%     
==========================================
  Files         180      182       +2     
  Lines       20826    21448     +622     
==========================================
+ Hits        10267    10524     +257     
- Misses       9426     9747     +321     
- Partials     1133     1177      +44     
Flag Coverage Δ
all 48.72% <39.41%> (-0.23%) ⬇️
cover 49.23% <40.22%> (-0.17%) ⬇️
crosscover 49.06% <39.41%> (-0.23%) ⬇️
update 12.84% <29.11%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/pmm-managed-starlark/main.go 0.00% <0.00%> (ø)
main.go 0.00% <0.00%> (ø)
models/database.go 49.61% <0.00%> (ø)
models/node_helpers.go 71.08% <ø> (ø)
models/settings.go 100.00% <ø> (ø)
services/agents/handler.go 0.00% <0.00%> (ø)
services/agents/state.go 0.00% <0.00%> (ø)
services/alertmanager/alertmanager.go 53.92% <ø> (ø)
services/grafana/auth_server.go 59.18% <ø> (ø)
services/management/ia/alerts_service.go 59.84% <0.00%> (-1.27%) ⬇️
... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2050762...0dea6c6. Read the comment docs.

@@ -0,0 +1,295 @@
// pmm-managed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we include this test into api-tests directory?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with that we will be able to remove a lot of duplications

}

for _, pmmAgent := range agentListResponse.Payload.PMMAgent {
if pmmAgent.AgentID == "pmm-server" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also check that this pmm-agent is connected.

@BupycHuk
Copy link
Member

API tests are failing with

make: *** No rule to make target 'init'.  Stop.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants