Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
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 Apr 10, 2019
5c25c7b
PMM-3632 Fix wrong tests. (#10)
BupycHuk Apr 20, 2019
22c32ad
Update deps.
AlekSi Apr 21, 2019
1a5e0d1
Update Swagger client settings. (#11)
AlekSi Apr 22, 2019
3d449f4
PMM-3856 Tests for service remove endpoint.
BupycHuk Apr 25, 2019
0e4d949
Update API.
AlekSi Apr 29, 2019
344cc27
PMM-3977 Fix ticket number.
AlekSi May 2, 2019
b8c73f4
PMM-3974 Tests for Management API. (#14)
BupycHuk May 7, 2019
4df92e9
Update deps.
AlekSi May 7, 2019
8a74755
PMM-4005 Remove endpoints and expected failures.
BupycHuk May 9, 2019
c457ea4
Add CODEOWNERS.
AlekSi May 10, 2019
01d5675
PMM-3866 Required username and default agents. (#16)
BupycHuk May 10, 2019
2e4821b
Minor simplification.
AlekSi May 13, 2019
ebe1d04
PMM-4007 Tests for force removal.
BupycHuk May 14, 2019
c7b9324
Fix test for node register.
BupycHuk May 16, 2019
b3f7021
PMM-4137 Fix API tests. (#19)
BupycHuk May 30, 2019
726c144
Enable version test. (#20)
AlekSi May 30, 2019
3203d0e
Update API.
AlekSi Jun 7, 2019
f37d4c4
PMM-4169 API tests for ProxySQL. (#21)
BupycHuk Jun 14, 2019
d59b8f0
PMM-4197 Fix tests. (#22)
AlekSi Jun 17, 2019
8abf1f9
PMM-4179 API tests for QAN for PostgreSQL. (#23)
BupycHuk Jun 28, 2019
1836d38
PMM-4246 Add tests for settings. (#25)
AlekSi Jul 1, 2019
cf57527
PMM-4246 Test gRPC codes. (#26)
AlekSi Jul 1, 2019
50ec88b
Update API.
AlekSi Jul 5, 2019
b4a06b5
PMM-3977 Enable HTTP basic auth.
AlekSi Jul 9, 2019
f057748
PMM-4313 Fix tests. (#29)
AlekSi Jul 16, 2019
c803b38
Update version test.
AlekSi Jul 16, 2019
15ab0aa
Add envvar to help output.
AlekSi Jul 25, 2019
8609c51
PMM-4379 New and changed tests for updates. (#30)
AlekSi Jul 30, 2019
9231324
PMM-4443 Return times and nice versions. (#31)
AlekSi Aug 2, 2019
2af4430
PMM-4425 Auth errors. (#32)
AlekSi Aug 5, 2019
944fbdc
PMM-4471 Tests for new APIs. (#33)
AlekSi Aug 8, 2019
eeccdb6
PMM-3294 Set TLS config.
AlekSi Aug 8, 2019
2e9ff20
Do not check updates in parallel.
AlekSi Aug 14, 2019
5abc697
Update API.
AlekSi Aug 14, 2019
06c7e4b
PMM-4012 Add Remote Node. (#35)
BupycHuk Aug 19, 2019
978701c
Added tests output converter to jUnit format for Jenkins. (#38)
idexter Aug 21, 2019
e63475b
PMM-4448 Tests for updates. (#36)
AlekSi Aug 23, 2019
c885961
PMM-4448 Run tests with race detector by default.
AlekSi Aug 23, 2019
c0fa7b7
Fix default target.
AlekSi Aug 25, 2019
4abd14e
Update deps.
AlekSi Aug 25, 2019
94e5c9b
Debug PMM Server update test.
AlekSi Aug 26, 2019
57cb43c
PMM-4249 Add test data retention settings (#37)
askomorokhov Aug 26, 2019
62abfc6
PMM-4289 Update tests. (#41)
AlekSi Aug 28, 2019
917eb01
PMM-3670 Temporary fix for updates test.
AlekSi Aug 30, 2019
f958f1a
PMM-3670 More hacks.
AlekSi Aug 30, 2019
173d368
PMM-4544 Remove old test. (#45)
AlekSi Sep 2, 2019
5cf5308
Use Go 1.12 to fix tests.
AlekSi Sep 4, 2019
b2f90c9
Remove old tests.
AlekSi Sep 4, 2019
60b25a2
Fix tests.
AlekSi Sep 10, 2019
4c376b5
Update API.
AlekSi Sep 10, 2019
60012f7
Update API.
AlekSi Sep 11, 2019
68558f4
Update API.
AlekSi Sep 12, 2019
866e792
Fix test.
AlekSi Sep 13, 2019
97035ae
PMM-4594 Update API. (#48)
AlekSi Sep 14, 2019
31852b6
PMM-3989 Remove passwords from API responses. (#49)
AlekSi Sep 14, 2019
463bdca
PMM-3786 Cleanup APIs. (#50)
AlekSi Sep 14, 2019
640891d
Update API.
AlekSi Sep 15, 2019
e55b7ac
Update API.
AlekSi Sep 16, 2019
faa1712
PMM-4033 Remove `oneof` from requests. (#51)
AlekSi Sep 16, 2019
f402dab
Be less paranoid.
AlekSi Sep 16, 2019
85eec71
Relax timing test.
AlekSi Sep 17, 2019
c63d70d
Fix tests for version numbers.
AlekSi Sep 18, 2019
60d8816
PMM-4444 Add test.
AlekSi Sep 19, 2019
47bf28a
PMM-4736 Extract logging for the last line. (#53)
AlekSi Sep 20, 2019
e86e47f
PMM-4010 Make it work with Go 1.13.
AlekSi Sep 25, 2019
83f8fae
PMM-4010 Use Go 1.13 for Docker.
AlekSi Sep 25, 2019
e84e6ae
PMM-4736 Check last update output line.
AlekSi Oct 11, 2019
786b29b
PMM-4836 Make test less aggressive.
AlekSi Oct 16, 2019
5c9be4e
PMM-4853 Harden tests. (#58)
AlekSi Oct 18, 2019
59f467e
PMM-4895 Check that both pmm-update and pmm-managed are updated. (#60)
AlekSi Nov 4, 2019
579167e
Update deps.
AlekSi Nov 13, 2019
c8eb38a
Tweak timings to fix tests.
AlekSi Nov 18, 2019
bd59897
Split Agents tests into several files.
AlekSi Nov 20, 2019
c3ed5cf
PMM-4809 Make tablestat group configurable. (#62)
AlekSi Nov 20, 2019
3ad4aa8
Update API.
AlekSi Nov 21, 2019
7970236
PMM-4950 Add AWS partitions to settings. (#65)
AlekSi Nov 25, 2019
3d7e29d
PMM-4475 Added test for RDS discovery. (#64)
percona-csalguero Nov 26, 2019
e1662a6
PMM-4949 RDS Management API. (#67)
AlekSi Nov 28, 2019
9b4a0c5
PMM-5026 Added test for tables count (#66)
percona-csalguero Nov 28, 2019
4f37c8d
Update API branch.
AlekSi Nov 29, 2019
9c043d9
PMM-4317 API tests for upload SSH key. (#68)
BupycHuk Nov 29, 2019
1213b16
PMM-4767 AWS instance check API. (#69)
AlekSi Dec 6, 2019
9092779
PMM-4474 Added RDS exporter agent tests (#71)
percona-csalguero Dec 12, 2019
ca16bcd
PMM-4010 Updated travis.yml
percona-csalguero Dec 16, 2019
3be10d5
PMM-5008 Tests for node type validation. (#72)
BupycHuk Dec 20, 2019
6cd5c63
PMM-5200 Fix API tests. (#75)
BupycHuk Dec 23, 2019
c401079
PMM-5216 Update last line.
AlekSi Dec 25, 2019
940704f
PMM-5137 Test Swagger permissions. (#74)
AlekSi Jan 21, 2020
5768e36
PMM-5064 Added tests for alert manager settings (#76)
percona-csalguero Feb 7, 2020
aa02546
PMM-5192 Remove go1.12 from .travis.yml, update README.md (#79)
artemgavrilov Feb 11, 2020
2b7c7f6
PMM-5182 Added test for logs.zip (#78)
percona-csalguero Feb 26, 2020
169fb87
PMM-5182 PMM-5467 Update deps, fix test. (#80)
AlekSi Feb 27, 2020
8cf4016
PMM-5448 Tests for new resolutions (#81)
percona-csalguero Mar 4, 2020
c1c431e
PMM-4931 Revert settings on teardown. (#83)
BupycHuk Mar 10, 2020
b5f592a
PMM-5112 Tests for filtering by type. (#82)
BupycHuk Mar 11, 2020
c5110ba
PMM-4919 Re-register force allows new hostname. (#70)
percona-csalguero Mar 19, 2020
8141e7b
PMM-5042 Add service address and socket test. (#86)
askomorokhov Mar 27, 2020
0464f0a
PMM-4192 Added test for MongoDB Explain (#85)
percona-csalguero Mar 30, 2020
3ce5149
PMM-4145 Add simple test disable RDS metrics collection. (#84)
askomorokhov Apr 6, 2020
3945df0
PMM-5559 Add annotation tests. (#87)
askomorokhov Apr 22, 2020
7ed7752
Fix logs test. (#88)
BupycHuk Apr 22, 2020
0ef84e6
PMM-5695 Tests for fixed error messages. (#89)
BupycHuk Apr 22, 2020
18f48d7
PMM-5776 Add external service test. (#90)
askomorokhov Apr 29, 2020
f0fa18a
PMM-5819 added STT tests (#91)
yurkovychv Apr 30, 2020
ebe9655
PMM-5777 Inventory add external exporter. (#93)
BupycHuk May 5, 2020
a4a3c1b
PMM-5728 Tests for management API for external services. (#95)
BupycHuk May 6, 2020
c0fd578
PMM-5728 Fix tests for removing external services. (#98)
BupycHuk May 11, 2020
547be81
PMM-5257 Cover ProxySQL socket with tests. (#92)
askomorokhov May 19, 2020
e699fb5
PMM-5524 Fix API tests.
BupycHuk May 19, 2020
f592086
SAAS-119 Alertmanager test for checking failed checks. (#94)
yurkovychv May 21, 2020
c828b9e
PMM-5243 Test PostgreSQL socket connection. (#96)
askomorokhov May 25, 2020
1004cfb
PMM-5723 Reviewdog checks. (#101)
BupycHuk May 26, 2020
ec0aa0a
PMM-5723 Github token for reviewdog. (#104)
BupycHuk May 27, 2020
db05dfe
PMM-5256 Test MongoDB socket. (#97)
askomorokhov May 29, 2020
822668e
SAAS-142 API tests for triggering checks execution (#99)
artemgavrilov Jun 2, 2020
e05dbc5
PMM-5968 Avoid removing PMM Server. (#105)
BupycHuk Jun 3, 2020
fa841b6
SAAS-136 Add STT permissions tests (#103)
artemgavrilov Jun 11, 2020
9d74617
Disable lll linter (#109)
AlekSi Jun 23, 2020
89437a2
SAAS-104 Add API tests (#108)
palash25 Jun 30, 2020
8fdfe4b
SAAS-104 Add ticket number and flag (#112)
AlekSi Jun 30, 2020
5743cc5
PMM-5106 Add Docker Compose config. (#113)
AlekSi Jun 30, 2020
d8e5742
PMM-5645 Update API and open api to use go 1.14 (#110)
askomorokhov Jun 30, 2020
ff580ac
PMM-5563 Annotation, service node, (#111)
JiriCtvrtka Jul 1, 2020
172040b
SAAS-125: Add API tests (#114)
palash25 Jul 13, 2020
877d537
PMM-6213 Remove go 1.13 from travis. (#115)
askomorokhov Jul 14, 2020
b8f65f9
PMM-6251 update deps (#117)
askomorokhov Jul 28, 2020
af10b6d
SAAS-175 Add tests for auth API (#116)
artemgavrilov Jul 28, 2020
8fca9a9
SAAS-237 Add API tests (#119)
palash25 Aug 12, 2020
e8d5025
SAAS-266 Add platform sign out test (#120)
artemgavrilov Aug 26, 2020
94a43bf
PMM-6038 PT summary. (#122)
JiriCtvrtka Aug 28, 2020
51dd8e5
PMM-6130 PMM-managed API for kubernetes clusters. (#121)
BupycHuk Sep 1, 2020
d50f231
SAAS-276 Generate fake emails in auth tests (#123)
AlekSi Sep 2, 2020
cd20b0f
PMM-4597 Fix API tests. (#127)
AlekSi Oct 1, 2020
e283d09
PMM 2.11 changes (#126)
AlekSi Oct 1, 2020
84c7f6a
PMM-6457 Add API test for DBaaS (#125)
askomorokhov Oct 8, 2020
8d94b48
PMM-6433 Skip kubernetes tests if kubeconfig is not provided. (#128)
BupycHuk Oct 9, 2020
fc90c2a
PMM-6629 protobuf 1.4 (#129)
askomorokhov Oct 9, 2020
294b3c8
[PMM-6756] Added go 1.15.x. (#131)
yareach Oct 20, 2020
c5b7b3e
SAAS-377 Disable checks by name (#130)
artemgavrilov Oct 20, 2020
bfacbf9
PMM-6716 Test Show endpoint. (#132)
askomorokhov Oct 27, 2020
83df07b
Update dependencies.
BupycHuk Oct 27, 2020
1f0c987
PMM-6401 fixes tests after replacing prometheus with victoriametrics …
f41gh7 Oct 28, 2020
1667b90
PMM-6401 Revert test updates (#138)
BupycHuk Oct 29, 2020
c2550f6
PMM-6746 Tests for PSMDB API. (#135)
BupycHuk Nov 3, 2020
3d77615
Revert "PMM-6401 Revert test updates (#138)" (#139)
BupycHuk Nov 4, 2020
5176861
PMM-6050 Add external group (#137)
askomorokhov Nov 4, 2020
f564520
PMM-6395 VMagent integration (#140)
f41gh7 Nov 17, 2020
11403bd
SAAS-413 Check for existance of check description (#141)
palash25 Nov 18, 2020
3d29340
PMM-6824 DBaaS restart (#143)
askomorokhov Nov 20, 2020
d2bed96
Remove old environment variable
AlekSi Nov 24, 2020
365bc2b
Fix api tests (#144)
askomorokhov Nov 25, 2020
9a09319
PMM-6968 Notification channels API (#145)
artemgavrilov Nov 27, 2020
57380cb
PMM-6968 Improve channels tests (#146)
artemgavrilov Nov 30, 2020
837e6d5
Add travis-ci.com badge (#148)
AlekSi Dec 2, 2020
0054a51
PMM-6983 Add force for unregister k8s (#150)
JiriCtvrtka Dec 8, 2020
f35db7b
PMM-6909 Rule template API tests (#147)
artemgavrilov Dec 10, 2020
1cb4875
Update pmm repo
BupycHuk Dec 15, 2020
0c35596
Update pmm repo
BupycHuk Dec 15, 2020
ac0926f
PMM-5980 Add suspend/resume PXC (#152)
askomorokhov Dec 16, 2020
43f4c0b
PMM-6897 Add suspend/resume PSMDB (#153)
askomorokhov Dec 16, 2020
dbae12d
PMM-6969 Rules API tests (#151)
artemgavrilov Dec 16, 2020
d72a90f
PMM-6982 Update settings and IA tests (#154)
palash25 Dec 18, 2020
0eb3d8e
Toggle Rule API test (#157)
AlekSi Dec 21, 2020
9b55324
PMM-7135 Add seconds and summary (#158)
artemgavrilov Dec 22, 2020
6eaaf3f
PMM-7212 Add test for creating rule from built-in template (#159)
artemgavrilov Dec 22, 2020
4b44bfa
PMM-6891 Fix restore settings defaults (#160)
artemgavrilov Dec 23, 2020
de49b0d
PMM-6944 API for k8s config. (#156)
JiriCtvrtka Dec 23, 2020
1fd5c61
PMM-7135 Update deps (#161)
AlekSi Dec 23, 2020
8be34b3
PMM-7135 Fix test (#162)
AlekSi Dec 23, 2020
a9b3bba
PMM-7214 Fix API tests (#164)
AlekSi Dec 25, 2020
f78521b
PMM-7220 API test for deleting an in-use template (#163)
palash25 Dec 25, 2020
082ac7d
PMM-7228 Fix tests (#165)
AlekSi Dec 28, 2020
925997b
PMM-6941 Update tests (#171)
artemgavrilov Jan 13, 2021
3e58538
PMM-5137 Allow to follow redirects in auth tests (#172)
artemgavrilov Jan 13, 2021
fa0f783
PMM-7182 add test case to create rule with channel and filters (#166)
palash25 Jan 14, 2021
4e8d57e
PMM-5765 Add External service on remote node. (#168)
BupycHuk Jan 14, 2021
ae4ba6a
PMM-7015 Fix test. (#169)
askomorokhov Jan 20, 2021
d76c0d2
Fix tests for Go 1.15 (#173)
AlekSi Jan 21, 2021
07fbc4f
PMM-7226 Add tests for rule parameters (#167)
artemgavrilov Jan 22, 2021
0ee3b68
PMM-7145 Set PushMetricsEnabled flag (#174)
artemgavrilov Jan 26, 2021
60cb2e8
PMM-7145 Set PushMetricsEnabled flag (#174) (#176)
artemgavrilov Jan 26, 2021
ce10713
PMM-7279 param units (#170)
artemgavrilov Feb 2, 2021
0ed5914
PMM-7306 disable collectors (#177)
askomorokhov Feb 4, 2021
354d7fa
PMM-6711 Add test filter by external group. (#179)
askomorokhov Feb 9, 2021
7459217
PMM-6640 API for HAProxy. (#183)
JiriCtvrtka Feb 9, 2021
c7ddb4b
PMM-6640 HAProxy test with remote node. (#185)
JiriCtvrtka Feb 11, 2021
d1697ba
PMM-7467 Test IA rule expression (#182)
artemgavrilov Feb 11, 2021
68111af
PMM-7250 Update tests to reflect renaming of Get to GetCredentials (#…
jprukner Feb 11, 2021
fd4ca67
PMM-7380 backup location list add (#181)
Dasio Feb 12, 2021
ccb7223
update deps
BupycHuk Feb 14, 2021
55d4016
Merge remote-tracking branch 'origin/master' into release/2.15
BupycHuk Feb 14, 2021
c1180dc
Update deps.
BupycHuk Feb 14, 2021
1e1f396
Changes from 2.15 (#187)
BupycHuk Feb 14, 2021
f338ecb
Revert "Changes from 2.15 (#187)" (#188)
BupycHuk Feb 15, 2021
0889415
Merge pull request #189 from Percona-Lab/release/2.15
BupycHuk Feb 15, 2021
2c85bbf
PMM-6693 Tests for API Key support. (#184)
BupycHuk Feb 17, 2021
0c3f533
PMM-6766: Remove QAN (#195)
oter Feb 18, 2021
e87e2b3
PMM-7487 HAProxy connection check. (#193)
JiriCtvrtka Feb 19, 2021
527bafc
PMM-7405 Fix tests. (#194)
askomorokhov Feb 19, 2021
d9673d3
PMM-7296: Add ListAlertRules pagination tests (#180)
oter Feb 19, 2021
5a87b87
PMM-7366 Add tests for deletion channel that used by some rule (#186)
artemgavrilov Feb 22, 2021
5209eab
PMM-7382 Update backup location tests (#190)
Feb 22, 2021
6ce152e
update deps
BupycHuk Feb 22, 2021
199b833
Add license scan report and status (#196)
Feb 23, 2021
0a3cb27
PMM-7383 Remove backup location (#192)
Feb 24, 2021
9d6f5d9
PMM-7557: Add backup bucket field (#197)
oter Feb 26, 2021
4628fa2
PMM-7337 STT check intervals (#198)
nicolalamacchia Mar 5, 2021
d4dbbc3
PMM-7119 UpdateTemplate mismatch names (#175)
Mar 8, 2021
8872787
PMM-7313 RDS-PostgreSQL (#201)
percona-csalguero Mar 8, 2021
dad9d43
PMM-7508 Add tests for get cluster resources
tiagomotasantos Mar 8, 2021
d6b4b26
PMM-7503 DBaaS: Add GetResources RPC (#202)
Mar 9, 2021
cf793fb
PMM-7521 Alert Templates pagination (#199)
Mar 9, 2021
eb9cd09
PMM-7522 channels pagination (#200)
Mar 9, 2021
f63b6de
PMM-7508 Fix dep check
tiagomotasantos Mar 9, 2021
052a472
Merge branch 'release/2.16' into PMM-7508-expected-resources
tiagomotasantos Mar 10, 2021
130b8dd
PMM-7508 Fix dep
tiagomotasantos Mar 10, 2021
5480edf
Merge pull request #204 from Percona-Lab/PMM-7508-expected-resources
tiagomotasantos Mar 12, 2021
319cee0
PMM-7448: Add tests (#206)
oter Mar 17, 2021
36c3265
PMM-7626 go modules (#203)
Mar 18, 2021
72e9323
update deps
BupycHuk Mar 18, 2021
b6420c2
Merge branch 'master' into release/2.16
BupycHuk Mar 19, 2021
0cc961a
Merge pull request #209 from Percona-Lab/release/2.16
BupycHuk Mar 19, 2021
8298348
SAAS-487 Update API tests for new registration flow (#205)
palash25 Mar 25, 2021
6421054
PMM-7652 DBaaS: Resource calculator - add stograge test (#207)
Mar 29, 2021
eb4280f
PMM-7676 API test for azure_database_exporter. (#210)
JiriCtvrtka Apr 6, 2021
acf26ad
PMM-7338 API test for change check interval (#211)
palash25 Apr 8, 2021
f468b66
Fix tests (#213)
BupycHuk Apr 13, 2021
faf7392
Update README.md (#214)
BupycHuk Apr 14, 2021
a825990
PMM-7819 modify TestXtraDBClusterServer to use HAProxy (#212)
Apr 20, 2021
d0b8490
PMM-7832 skip test for s3 config (#215)
Dasio Apr 21, 2021
0aec792
PMM-8121 bettter error message (#218)
Dasio May 24, 2021
de8ff4c
PMM-6295 add unknown status (#219)
May 28, 2021
3d69a92
PMM-8013: Fix test (#220)
oter Jun 8, 2021
b9fc498
PMM-7627 manage server logs using supervisor (#217)
Jun 29, 2021
f1d87ab
PMM-7627 Manage server logs using supervisor (#222)
Jun 29, 2021
6544eb7
PMM-8337 fix tests (#223)
nikita-b Jul 1, 2021
df10b55
PMM-8155 Backup scheduling (#221)
Dasio Jul 13, 2021
15851f7
Fix external service tests (#225)
Dasio Jul 13, 2021
9fd5877
PMM-2168 disable rds exporter (#227)
artemgavrilov Jul 27, 2021
7d6d1c6
PMM-5016 Don't expect error (#226)
Dasio Jul 28, 2021
77e11bd
Add 'api-tests/' from commit '7d6d1c6dabf0c808360e9068b8cedef966623864'
Jul 30, 2021
8b72a1d
Removed newline
askomorokhov Apr 16, 2021
ff9fe28
license header
Jul 30, 2021
0a242d6
Merge gitignore and .github
Jul 30, 2021
663bf4d
Update docker go path
Jul 30, 2021
fac9e32
Renamed go module for api tests
Jul 30, 2021
3f57fbe
Merge branch 'PMM-2.0' into move-api-tests
Dasio Aug 3, 2021
99234e9
Merge branch 'PMM-2.0' into move-api-tests
Dasio Aug 18, 2021
9e13831
PMM-8309: Migrate pmm-server:dev-latest to ECR for PMM API Tests
Aug 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
* @BupycHuk
/api-tests/ @BupycHuk
/data/iatemplates/ @BupycHuk @adivinho
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
# run every Sunday to re-populate caches after they are cleaned on Saturday
- cron: "0 12 * * 0"
push:
paths-ignore:
- 'api-tests/**'
branches:
- PMM-2.0
- release-*
Expand Down
10 changes: 7 additions & 3 deletions .gitignore
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

27 changes: 27 additions & 0 deletions api-tests/.golangci-required.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that we can remove this file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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
39 changes: 39 additions & 0 deletions api-tests/.golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The 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'
8 changes: 8 additions & 0 deletions api-tests/Dockerfile
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
46 changes: 46 additions & 0 deletions api-tests/Makefile
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
51 changes: 51 additions & 0 deletions api-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# pmm-api-tests

[![Build Status](https://travis-ci.com/Percona-Lab/pmm-api-tests.svg?branch=master)](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.
86 changes: 86 additions & 0 deletions api-tests/docker-compose.yml
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:
25 changes: 25 additions & 0 deletions api-tests/go.mod
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
)
Loading