This repository was archived by the owner on Jun 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Move pmm-api-tests #772
Merged
Merged
Move pmm-api-tests #772
Changes from all commits
Commits
Show all changes
263 commits
Select commit
Hold shift + click to select a range
8f86451
PMM-3786 Update API.
AlekSi 5c25c7b
PMM-3632 Fix wrong tests. (#10)
BupycHuk 22c32ad
Update deps.
AlekSi 1a5e0d1
Update Swagger client settings. (#11)
AlekSi 3d449f4
PMM-3856 Tests for service remove endpoint.
BupycHuk 0e4d949
Update API.
AlekSi 344cc27
PMM-3977 Fix ticket number.
AlekSi b8c73f4
PMM-3974 Tests for Management API. (#14)
BupycHuk 4df92e9
Update deps.
AlekSi 8a74755
PMM-4005 Remove endpoints and expected failures.
BupycHuk c457ea4
Add CODEOWNERS.
AlekSi 01d5675
PMM-3866 Required username and default agents. (#16)
BupycHuk 2e4821b
Minor simplification.
AlekSi ebe1d04
PMM-4007 Tests for force removal.
BupycHuk c7b9324
Fix test for node register.
BupycHuk b3f7021
PMM-4137 Fix API tests. (#19)
BupycHuk 726c144
Enable version test. (#20)
AlekSi 3203d0e
Update API.
AlekSi f37d4c4
PMM-4169 API tests for ProxySQL. (#21)
BupycHuk d59b8f0
PMM-4197 Fix tests. (#22)
AlekSi 8abf1f9
PMM-4179 API tests for QAN for PostgreSQL. (#23)
BupycHuk 1836d38
PMM-4246 Add tests for settings. (#25)
AlekSi cf57527
PMM-4246 Test gRPC codes. (#26)
AlekSi 50ec88b
Update API.
AlekSi b4a06b5
PMM-3977 Enable HTTP basic auth.
AlekSi f057748
PMM-4313 Fix tests. (#29)
AlekSi c803b38
Update version test.
AlekSi 15ab0aa
Add envvar to help output.
AlekSi 8609c51
PMM-4379 New and changed tests for updates. (#30)
AlekSi 9231324
PMM-4443 Return times and nice versions. (#31)
AlekSi 2af4430
PMM-4425 Auth errors. (#32)
AlekSi 944fbdc
PMM-4471 Tests for new APIs. (#33)
AlekSi eeccdb6
PMM-3294 Set TLS config.
AlekSi 2e9ff20
Do not check updates in parallel.
AlekSi 5abc697
Update API.
AlekSi 06c7e4b
PMM-4012 Add Remote Node. (#35)
BupycHuk 978701c
Added tests output converter to jUnit format for Jenkins. (#38)
idexter e63475b
PMM-4448 Tests for updates. (#36)
AlekSi c885961
PMM-4448 Run tests with race detector by default.
AlekSi c0fa7b7
Fix default target.
AlekSi 4abd14e
Update deps.
AlekSi 94e5c9b
Debug PMM Server update test.
AlekSi 57cb43c
PMM-4249 Add test data retention settings (#37)
askomorokhov 62abfc6
PMM-4289 Update tests. (#41)
AlekSi 917eb01
PMM-3670 Temporary fix for updates test.
AlekSi f958f1a
PMM-3670 More hacks.
AlekSi 173d368
PMM-4544 Remove old test. (#45)
AlekSi 5cf5308
Use Go 1.12 to fix tests.
AlekSi b2f90c9
Remove old tests.
AlekSi 60b25a2
Fix tests.
AlekSi 4c376b5
Update API.
AlekSi 60012f7
Update API.
AlekSi 68558f4
Update API.
AlekSi 866e792
Fix test.
AlekSi 97035ae
PMM-4594 Update API. (#48)
AlekSi 31852b6
PMM-3989 Remove passwords from API responses. (#49)
AlekSi 463bdca
PMM-3786 Cleanup APIs. (#50)
AlekSi 640891d
Update API.
AlekSi e55b7ac
Update API.
AlekSi faa1712
PMM-4033 Remove `oneof` from requests. (#51)
AlekSi f402dab
Be less paranoid.
AlekSi 85eec71
Relax timing test.
AlekSi c63d70d
Fix tests for version numbers.
AlekSi 60d8816
PMM-4444 Add test.
AlekSi 47bf28a
PMM-4736 Extract logging for the last line. (#53)
AlekSi e86e47f
PMM-4010 Make it work with Go 1.13.
AlekSi 83f8fae
PMM-4010 Use Go 1.13 for Docker.
AlekSi e84e6ae
PMM-4736 Check last update output line.
AlekSi 786b29b
PMM-4836 Make test less aggressive.
AlekSi 5c9be4e
PMM-4853 Harden tests. (#58)
AlekSi 59f467e
PMM-4895 Check that both pmm-update and pmm-managed are updated. (#60)
AlekSi 579167e
Update deps.
AlekSi c8eb38a
Tweak timings to fix tests.
AlekSi bd59897
Split Agents tests into several files.
AlekSi c3ed5cf
PMM-4809 Make tablestat group configurable. (#62)
AlekSi 3ad4aa8
Update API.
AlekSi 7970236
PMM-4950 Add AWS partitions to settings. (#65)
AlekSi 3d7e29d
PMM-4475 Added test for RDS discovery. (#64)
percona-csalguero e1662a6
PMM-4949 RDS Management API. (#67)
AlekSi 9b4a0c5
PMM-5026 Added test for tables count (#66)
percona-csalguero 4f37c8d
Update API branch.
AlekSi 9c043d9
PMM-4317 API tests for upload SSH key. (#68)
BupycHuk 1213b16
PMM-4767 AWS instance check API. (#69)
AlekSi 9092779
PMM-4474 Added RDS exporter agent tests (#71)
percona-csalguero ca16bcd
PMM-4010 Updated travis.yml
percona-csalguero 3be10d5
PMM-5008 Tests for node type validation. (#72)
BupycHuk 6cd5c63
PMM-5200 Fix API tests. (#75)
BupycHuk c401079
PMM-5216 Update last line.
AlekSi 940704f
PMM-5137 Test Swagger permissions. (#74)
AlekSi 5768e36
PMM-5064 Added tests for alert manager settings (#76)
percona-csalguero aa02546
PMM-5192 Remove go1.12 from .travis.yml, update README.md (#79)
artemgavrilov 2b7c7f6
PMM-5182 Added test for logs.zip (#78)
percona-csalguero 169fb87
PMM-5182 PMM-5467 Update deps, fix test. (#80)
AlekSi 8cf4016
PMM-5448 Tests for new resolutions (#81)
percona-csalguero c1c431e
PMM-4931 Revert settings on teardown. (#83)
BupycHuk b5f592a
PMM-5112 Tests for filtering by type. (#82)
BupycHuk c5110ba
PMM-4919 Re-register force allows new hostname. (#70)
percona-csalguero 8141e7b
PMM-5042 Add service address and socket test. (#86)
askomorokhov 0464f0a
PMM-4192 Added test for MongoDB Explain (#85)
percona-csalguero 3ce5149
PMM-4145 Add simple test disable RDS metrics collection. (#84)
askomorokhov 3945df0
PMM-5559 Add annotation tests. (#87)
askomorokhov 7ed7752
Fix logs test. (#88)
BupycHuk 0ef84e6
PMM-5695 Tests for fixed error messages. (#89)
BupycHuk 18f48d7
PMM-5776 Add external service test. (#90)
askomorokhov f0fa18a
PMM-5819 added STT tests (#91)
yurkovychv ebe9655
PMM-5777 Inventory add external exporter. (#93)
BupycHuk a4a3c1b
PMM-5728 Tests for management API for external services. (#95)
BupycHuk c0fd578
PMM-5728 Fix tests for removing external services. (#98)
BupycHuk 547be81
PMM-5257 Cover ProxySQL socket with tests. (#92)
askomorokhov e699fb5
PMM-5524 Fix API tests.
BupycHuk f592086
SAAS-119 Alertmanager test for checking failed checks. (#94)
yurkovychv c828b9e
PMM-5243 Test PostgreSQL socket connection. (#96)
askomorokhov 1004cfb
PMM-5723 Reviewdog checks. (#101)
BupycHuk ec0aa0a
PMM-5723 Github token for reviewdog. (#104)
BupycHuk db05dfe
PMM-5256 Test MongoDB socket. (#97)
askomorokhov 822668e
SAAS-142 API tests for triggering checks execution (#99)
artemgavrilov e05dbc5
PMM-5968 Avoid removing PMM Server. (#105)
BupycHuk fa841b6
SAAS-136 Add STT permissions tests (#103)
artemgavrilov 9d74617
Disable lll linter (#109)
AlekSi 89437a2
SAAS-104 Add API tests (#108)
palash25 8fdfe4b
SAAS-104 Add ticket number and flag (#112)
AlekSi 5743cc5
PMM-5106 Add Docker Compose config. (#113)
AlekSi d8e5742
PMM-5645 Update API and open api to use go 1.14 (#110)
askomorokhov ff580ac
PMM-5563 Annotation, service node, (#111)
JiriCtvrtka 172040b
SAAS-125: Add API tests (#114)
palash25 877d537
PMM-6213 Remove go 1.13 from travis. (#115)
askomorokhov b8f65f9
PMM-6251 update deps (#117)
askomorokhov af10b6d
SAAS-175 Add tests for auth API (#116)
artemgavrilov 8fca9a9
SAAS-237 Add API tests (#119)
palash25 e8d5025
SAAS-266 Add platform sign out test (#120)
artemgavrilov 94a43bf
PMM-6038 PT summary. (#122)
JiriCtvrtka 51dd8e5
PMM-6130 PMM-managed API for kubernetes clusters. (#121)
BupycHuk d50f231
SAAS-276 Generate fake emails in auth tests (#123)
AlekSi cd20b0f
PMM-4597 Fix API tests. (#127)
AlekSi e283d09
PMM 2.11 changes (#126)
AlekSi 84c7f6a
PMM-6457 Add API test for DBaaS (#125)
askomorokhov 8d94b48
PMM-6433 Skip kubernetes tests if kubeconfig is not provided. (#128)
BupycHuk fc90c2a
PMM-6629 protobuf 1.4 (#129)
askomorokhov 294b3c8
[PMM-6756] Added go 1.15.x. (#131)
yareach c5b7b3e
SAAS-377 Disable checks by name (#130)
artemgavrilov bfacbf9
PMM-6716 Test Show endpoint. (#132)
askomorokhov 83df07b
Update dependencies.
BupycHuk 1f0c987
PMM-6401 fixes tests after replacing prometheus with victoriametrics …
f41gh7 1667b90
PMM-6401 Revert test updates (#138)
BupycHuk c2550f6
PMM-6746 Tests for PSMDB API. (#135)
BupycHuk 3d77615
Revert "PMM-6401 Revert test updates (#138)" (#139)
BupycHuk 5176861
PMM-6050 Add external group (#137)
askomorokhov f564520
PMM-6395 VMagent integration (#140)
f41gh7 11403bd
SAAS-413 Check for existance of check description (#141)
palash25 3d29340
PMM-6824 DBaaS restart (#143)
askomorokhov d2bed96
Remove old environment variable
AlekSi 365bc2b
Fix api tests (#144)
askomorokhov 9a09319
PMM-6968 Notification channels API (#145)
artemgavrilov 57380cb
PMM-6968 Improve channels tests (#146)
artemgavrilov 837e6d5
Add travis-ci.com badge (#148)
AlekSi 0054a51
PMM-6983 Add force for unregister k8s (#150)
JiriCtvrtka f35db7b
PMM-6909 Rule template API tests (#147)
artemgavrilov 1cb4875
Update pmm repo
BupycHuk 0c35596
Update pmm repo
BupycHuk ac0926f
PMM-5980 Add suspend/resume PXC (#152)
askomorokhov 43f4c0b
PMM-6897 Add suspend/resume PSMDB (#153)
askomorokhov dbae12d
PMM-6969 Rules API tests (#151)
artemgavrilov d72a90f
PMM-6982 Update settings and IA tests (#154)
palash25 0eb3d8e
Toggle Rule API test (#157)
AlekSi 9b55324
PMM-7135 Add seconds and summary (#158)
artemgavrilov 6eaaf3f
PMM-7212 Add test for creating rule from built-in template (#159)
artemgavrilov 4b44bfa
PMM-6891 Fix restore settings defaults (#160)
artemgavrilov de49b0d
PMM-6944 API for k8s config. (#156)
JiriCtvrtka 1fd5c61
PMM-7135 Update deps (#161)
AlekSi 8be34b3
PMM-7135 Fix test (#162)
AlekSi a9b3bba
PMM-7214 Fix API tests (#164)
AlekSi f78521b
PMM-7220 API test for deleting an in-use template (#163)
palash25 082ac7d
PMM-7228 Fix tests (#165)
AlekSi 925997b
PMM-6941 Update tests (#171)
artemgavrilov 3e58538
PMM-5137 Allow to follow redirects in auth tests (#172)
artemgavrilov fa0f783
PMM-7182 add test case to create rule with channel and filters (#166)
palash25 4e8d57e
PMM-5765 Add External service on remote node. (#168)
BupycHuk ae4ba6a
PMM-7015 Fix test. (#169)
askomorokhov d76c0d2
Fix tests for Go 1.15 (#173)
AlekSi 07fbc4f
PMM-7226 Add tests for rule parameters (#167)
artemgavrilov 0ee3b68
PMM-7145 Set PushMetricsEnabled flag (#174)
artemgavrilov 60cb2e8
PMM-7145 Set PushMetricsEnabled flag (#174) (#176)
artemgavrilov ce10713
PMM-7279 param units (#170)
artemgavrilov 0ed5914
PMM-7306 disable collectors (#177)
askomorokhov 354d7fa
PMM-6711 Add test filter by external group. (#179)
askomorokhov 7459217
PMM-6640 API for HAProxy. (#183)
JiriCtvrtka c7ddb4b
PMM-6640 HAProxy test with remote node. (#185)
JiriCtvrtka d1697ba
PMM-7467 Test IA rule expression (#182)
artemgavrilov 68111af
PMM-7250 Update tests to reflect renaming of Get to GetCredentials (#…
jprukner fd4ca67
PMM-7380 backup location list add (#181)
Dasio ccb7223
update deps
BupycHuk 55d4016
Merge remote-tracking branch 'origin/master' into release/2.15
BupycHuk c1180dc
Update deps.
BupycHuk 1e1f396
Changes from 2.15 (#187)
BupycHuk f338ecb
Revert "Changes from 2.15 (#187)" (#188)
BupycHuk 0889415
Merge pull request #189 from Percona-Lab/release/2.15
BupycHuk 2c85bbf
PMM-6693 Tests for API Key support. (#184)
BupycHuk 0c3f533
PMM-6766: Remove QAN (#195)
oter e87e2b3
PMM-7487 HAProxy connection check. (#193)
JiriCtvrtka 527bafc
PMM-7405 Fix tests. (#194)
askomorokhov d9673d3
PMM-7296: Add ListAlertRules pagination tests (#180)
oter 5a87b87
PMM-7366 Add tests for deletion channel that used by some rule (#186)
artemgavrilov 5209eab
PMM-7382 Update backup location tests (#190)
6ce152e
update deps
BupycHuk 199b833
Add license scan report and status (#196)
0a3cb27
PMM-7383 Remove backup location (#192)
9d6f5d9
PMM-7557: Add backup bucket field (#197)
oter 4628fa2
PMM-7337 STT check intervals (#198)
nicolalamacchia d4dbbc3
PMM-7119 UpdateTemplate mismatch names (#175)
8872787
PMM-7313 RDS-PostgreSQL (#201)
percona-csalguero dad9d43
PMM-7508 Add tests for get cluster resources
tiagomotasantos d6b4b26
PMM-7503 DBaaS: Add GetResources RPC (#202)
cf793fb
PMM-7521 Alert Templates pagination (#199)
eb9cd09
PMM-7522 channels pagination (#200)
f63b6de
PMM-7508 Fix dep check
tiagomotasantos 052a472
Merge branch 'release/2.16' into PMM-7508-expected-resources
tiagomotasantos 130b8dd
PMM-7508 Fix dep
tiagomotasantos 5480edf
Merge pull request #204 from Percona-Lab/PMM-7508-expected-resources
tiagomotasantos 319cee0
PMM-7448: Add tests (#206)
oter 36c3265
PMM-7626 go modules (#203)
72e9323
update deps
BupycHuk b6420c2
Merge branch 'master' into release/2.16
BupycHuk 0cc961a
Merge pull request #209 from Percona-Lab/release/2.16
BupycHuk 8298348
SAAS-487 Update API tests for new registration flow (#205)
palash25 6421054
PMM-7652 DBaaS: Resource calculator - add stograge test (#207)
eb4280f
PMM-7676 API test for azure_database_exporter. (#210)
JiriCtvrtka acf26ad
PMM-7338 API test for change check interval (#211)
palash25 f468b66
Fix tests (#213)
BupycHuk faf7392
Update README.md (#214)
BupycHuk a825990
PMM-7819 modify TestXtraDBClusterServer to use HAProxy (#212)
d0b8490
PMM-7832 skip test for s3 config (#215)
Dasio 0aec792
PMM-8121 bettter error message (#218)
Dasio de8ff4c
PMM-6295 add unknown status (#219)
3d69a92
PMM-8013: Fix test (#220)
oter b9fc498
PMM-7627 manage server logs using supervisor (#217)
f1d87ab
PMM-7627 Manage server logs using supervisor (#222)
6544eb7
PMM-8337 fix tests (#223)
nikita-b df10b55
PMM-8155 Backup scheduling (#221)
Dasio 15851f7
Fix external service tests (#225)
Dasio 9fd5877
PMM-2168 disable rds exporter (#227)
artemgavrilov 7d6d1c6
PMM-5016 Don't expect error (#226)
Dasio 77e11bd
Add 'api-tests/' from commit '7d6d1c6dabf0c808360e9068b8cedef966623864'
8b72a1d
Removed newline
askomorokhov ff9fe28
license header
0a242d6
Merge gitignore and .github
663bf4d
Update docker go path
fac9e32
Renamed go module for api tests
3f57fbe
Merge branch 'PMM-2.0' into move-api-tests
Dasio 99234e9
Merge branch 'PMM-2.0' into move-api-tests
Dasio 9e13831
PMM-8309: Migrate pmm-server:dev-latest to ECR for PMM API Tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| * @BupycHuk | ||
| /api-tests/ @BupycHuk | ||
| /data/iatemplates/ @BupycHuk @adivinho |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,12 @@ | ||
| /.idea/ | ||
| /.vscode/ | ||
| /bin/ | ||
| .idea/ | ||
| .vscode/ | ||
| bin/ | ||
| fuzzdata/ | ||
| cover.out | ||
| crosscover.out | ||
| packages.png | ||
| *.zip | ||
| *.test | ||
| pmm-api-tests-output.txt | ||
| pmm-api-tests-junit-report.xml | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems that we can remove this file.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are u sure? In this repo it is unusued, but it is used in makefile, it can be maybe used in some jenkins pipeline |
||
| # The most valuable linters; they are required to pass for PR to be merged. | ||
|
|
||
| linters-settings: | ||
| depguard: | ||
| list-type: blacklist | ||
| include-go-root: true | ||
| packages: | ||
| # use "github.com/pkg/errors" instead | ||
| - errors | ||
| # use "github.com/golang/protobuf/proto" instead | ||
| - github.com/gogo/protobuf/proto | ||
|
|
||
| goimports: | ||
| local-prefixes: github.com/Percona-Lab/pmm-api-tests | ||
|
|
||
| linters: | ||
| disable-all: true | ||
| enable: | ||
| - depguard | ||
| - goimports | ||
| - ineffassign | ||
| - govet | ||
| - staticcheck | ||
|
|
||
| issues: | ||
| exclude-use-default: false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| --- | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove |
||
| linters-settings: | ||
| depguard: | ||
| list-type: blacklist | ||
| include-go-root: true | ||
| packages: | ||
| # use "github.com/pkg/errors" instead | ||
| - errors | ||
| # use "github.com/golang/protobuf/proto" instead | ||
| - github.com/gogo/protobuf/proto | ||
|
|
||
| goimports: | ||
| local-prefixes: github.com/Percona-Lab/pmm-api-tests | ||
|
|
||
| lll: | ||
| line-length: 170 | ||
| tab-width: 4 | ||
|
|
||
| unused: | ||
| check-exported: true | ||
|
|
||
| unparam: | ||
| check-exported: true | ||
|
|
||
| linters: | ||
| enable-all: true | ||
| disable: | ||
| - wsl # too annoying | ||
| - lll # too annoying | ||
| - unused # very annoying false positive: https://github.com/golangci/golangci-lint/issues/791 | ||
| - goerr113 # we use different approach for errors | ||
| - testpackage # senseless | ||
| - exhaustivestruct # too annoying | ||
|
|
||
| issues: | ||
| exclude-use-default: false | ||
| exclude: | ||
| # gas: Duplicated errcheck checks | ||
| - 'G104: Errors unhandled' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| FROM golang:1.16 | ||
|
|
||
| RUN mkdir -p $GOPATH/src/github.com/percona/pmm-managed/api-tests | ||
|
|
||
| WORKDIR $GOPATH/src/github.com/percona/pmm-managed/api-tests/ | ||
| COPY . $GOPATH/src/github.com/percona/pmm-managed/api-tests/ | ||
|
|
||
| CMD make init run-race |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| BASE_PATH = $(shell pwd) | ||
| BIN_PATH := $(BASE_PATH)/bin | ||
|
|
||
| export PATH := $(BIN_PATH):$(PATH) | ||
|
|
||
| all: build | ||
|
|
||
| init: ## Installs development tools | ||
| go build -modfile=tools/go.mod -o $(BIN_PATH)/goimports golang.org/x/tools/cmd/goimports | ||
| go build -modfile=tools/go.mod -o $(BIN_PATH)/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint | ||
| go build -modfile=tools/go.mod -o $(BIN_PATH)/go-junit-report github.com/jstemmer/go-junit-report | ||
| go build -modfile=tools/go.mod -o $(BIN_PATH)/reviewdog github.com/reviewdog/reviewdog/cmd/reviewdog | ||
|
|
||
| build: | ||
| go install -v ./... | ||
| go test -c -v ./inventory | ||
| go test -c -v ./management | ||
| go test -c -v ./server | ||
|
|
||
| dev-test: ## Run test on dev env. Use `PMM_KUBECONFIG=/path/to/kubeconfig.yaml make dev-test` to run tests for DBaaS. | ||
| go test -count=1 -p 1 -v ./... -pmm.server-insecure-tls | ||
|
|
||
| run: | ||
| go test -count=1 -p 1 -v ./... 2>&1 | tee pmm-api-tests-output.txt | ||
| cat pmm-api-tests-output.txt | $(BIN_PATH)/go-junit-report > pmm-api-tests-junit-report.xml | ||
|
|
||
| run-race: | ||
| go test -count=1 -p 1 -v -race ./... 2>&1 | tee pmm-api-tests-output.txt | ||
| cat pmm-api-tests-output.txt | $(BIN_PATH)/go-junit-report > pmm-api-tests-junit-report.xml | ||
|
|
||
| FILES = $(shell find . -type f -name '*.go') | ||
|
|
||
| format: ## Format source code. | ||
| gofmt -w -s $(FILES) | ||
| $(BIN_PATH)/goimports -local github.com/Percona-Lab/pmm-api-tests -l -w $(FILES) | ||
|
|
||
| clean: | ||
| rm -f ./pmm-api-tests-output.txt | ||
| rm -f ./pmm-api-tests-junit-report.xml | ||
|
|
||
| check-all: ## Run golang ci linter to check new changes from master. | ||
| $(BIN_PATH)/golangci-lint run -c=.golangci.yml --new-from-rev=master | ||
|
|
||
| ci-reviewdog: ## Runs reviewdog checks. | ||
| $(BIN_PATH)/golangci-lint run -c=.golangci-required.yml --out-format=line-number | $(BIN_PATH)/reviewdog -f=golangci-lint -level=error -reporter=github-pr-check | ||
| $(BIN_PATH)/golangci-lint run -c=.golangci.yml --out-format=line-number | $(BIN_PATH)/reviewdog -f=golangci-lint -level=error -reporter=github-pr-review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # pmm-api-tests | ||
|
|
||
| [](https://travis-ci.com/Percona-Lab/pmm-api-tests) | ||
|
|
||
| API tests for PMM 2.x | ||
|
|
||
| # Setup Instructions | ||
|
|
||
| Make sure you have Go 1.16.x installed on your systems, execute the following steps | ||
| to setup API-tests in your local systems. | ||
|
|
||
| 1. Run PMM Server. | ||
| 2. Navigate to the tests root folder: `cd ~/go/src/github.com/percona/pmm-managed/api-tests` | ||
|
|
||
| # Usage | ||
|
|
||
| Run the tests using the following command: | ||
|
|
||
| ``` | ||
| go test ./... -pmm.server-url **pmm-server-url** -v | ||
| ``` | ||
|
|
||
| where `pmm-server-url` should be pointing to pmm-server. | ||
|
|
||
| # Docker | ||
|
|
||
| Build Docker image using the following command: | ||
|
|
||
| ``` | ||
| docker build -t IMAGENAME . | ||
| ``` | ||
|
|
||
| Run Docker container using the following command: | ||
|
|
||
| ``` | ||
| docker run -e PMM_SERVER_URL=**pmm-server-url** IMAGENAME | ||
| ``` | ||
|
|
||
| where `PMM_SERVER_URL` should be pointing to pmm-server. | ||
|
|
||
| If pmm-server located locally: | ||
|
|
||
| - Use --network=host while running docker container or add both containers to the same docker network. | ||
| - Use the insecure url if you default to a self-generated certificate. | ||
|
|
||
| # Contributing | ||
|
|
||
| All tests should follow these rules: | ||
|
|
||
| - Tests can work in parallel and in real system, so take into account that there might be records in database. | ||
| - Always revert changes made by test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| --- | ||
| # FIXME This file is not used yet; see https://jira.percona.com/browse/PMM-5106 | ||
|
|
||
| version: '3.7' | ||
|
|
||
| services: | ||
| pmm-server: | ||
| image: ${PMM_SERVER_IMAGE:-public.ecr.aws/e7j3v3n0/pmm-server:dev-latest} | ||
| container_name: pmm-agent_pmm-server | ||
| ports: | ||
| - 127.0.0.1:80:80 | ||
| - 127.0.0.1:443:443 | ||
| environment: | ||
| - PMM_DEBUG=1 | ||
| - PERCONA_TEST_CHECKS_INTERVAL=10s | ||
| # for local development | ||
| # - PERCONA_TEST_CHECKS_FILE=/srv/checks/custom-checks.yml | ||
| # for check-dev | ||
| - PERCONA_TEST_SAAS_HOST=check-dev.percona.com:443 | ||
| - PERCONA_TEST_CHECKS_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX | ||
| volumes: | ||
| - ./testdata/checks:/srv/checks | ||
|
|
||
| test_db: | ||
| image: aleksi/test_db:1.1.0 | ||
| container_name: pmm-agent_test_db | ||
| volumes: | ||
| - test_db_mysql:/test_db/mysql/world:ro | ||
| - test_db_postgres:/test_db/postgresql/world:ro | ||
|
|
||
| # It is essential to have an extra directory `/slowlogs/` between host and container; | ||
| # and to not have a trailing slash at `./testdata/mysql`. | ||
| # Otherwise, MySQL in Docker for Mac completely locks during/after slowlog rotation tests. | ||
| mysql: | ||
| image: ${MYSQL_IMAGE:-percona:5.7} | ||
| container_name: pmm-agent_mysql | ||
| command: > | ||
| --sql-mode="ANSI_QUOTES" | ||
| --performance-schema --innodb_monitor_enable=all | ||
| --slow_query_log --slow_query_log_file=/mysql/slowlogs/slow.log --long_query_time=0 | ||
| ports: | ||
| - 127.0.0.1:3306:3306 | ||
| environment: | ||
| - MYSQL_ROOT_PASSWORD=root-password | ||
| - MYSQL_USER=pmm-agent | ||
| - MYSQL_PASSWORD=pmm-agent-password | ||
| - UMASK=0777 # for slowlog file | ||
| volumes: | ||
| - test_db_mysql:/docker-entrypoint-initdb.d/:ro | ||
| - ./testdata/mysql:/mysql | ||
|
|
||
| mongo: | ||
| image: ${MONGO_IMAGE:-percona/percona-server-mongodb:4.2} | ||
| container_name: pmm-agent_mongo | ||
| command: --profile 2 | ||
| ports: | ||
| - 127.0.0.1:27017:27017 | ||
| environment: | ||
| - MONGO_INITDB_ROOT_USERNAME=root | ||
| - MONGO_INITDB_ROOT_PASSWORD=root-password | ||
|
|
||
| postgres: | ||
| image: ${POSTGRES_IMAGE:-postgres:11} | ||
| container_name: pmm-agent_postgres | ||
| command: > | ||
| -c shared_preload_libraries=pg_stat_statements | ||
| -c track_activity_query_size=2048 | ||
| -c pg_stat_statements.max=10000 | ||
| -c pg_stat_statements.track=all | ||
| -c pg_stat_statements.save=off | ||
| -c track_io_timing=on | ||
| ports: | ||
| - 127.0.0.1:5432:5432 | ||
| environment: | ||
| - POSTGRES_USER=pmm-agent | ||
| - POSTGRES_PASSWORD=pmm-agent-password | ||
| volumes: | ||
| - test_db_postgres:/docker-entrypoint-initdb.d/ | ||
|
|
||
| sysbench: | ||
| image: perconalab/sysbench | ||
| container_name: pmm-agent_sysbench | ||
|
|
||
| volumes: | ||
| test_db_mysql: | ||
| test_db_postgres: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| module github.com/percona/pmm-managed/api-tests | ||
|
|
||
| go 1.16 | ||
|
|
||
| // Use for local development, but do not commit: | ||
| // replace github.com/percona/pmm => ../../pmm | ||
|
|
||
| // Update with: | ||
| // go get -v github.com/percona/pmm@PMM-2.0 | ||
|
|
||
| require ( | ||
| github.com/AlekSi/pointer v1.1.0 | ||
| github.com/brianvoe/gofakeit/v6 v6.2.2 | ||
| github.com/davecgh/go-spew v1.1.1 | ||
| github.com/go-openapi/runtime v0.19.20 | ||
| github.com/go-openapi/spec v0.19.9 // indirect | ||
| github.com/percona-platform/saas v0.0.0-20210122115803-1b32ca1828e1 | ||
| github.com/percona/pmm v0.0.0-20210707115905-36eb37dae44c | ||
| github.com/prometheus/client_golang v1.9.0 | ||
| github.com/sirupsen/logrus v1.6.0 | ||
| github.com/stretchr/testify v1.6.1 | ||
| golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e | ||
| google.golang.org/grpc v1.35.0 | ||
| gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.