-
Notifications
You must be signed in to change notification settings - Fork 816
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use the `AgentCheckTest` class which makes the code much more readable and enjoyable for edge cases. * Factorize the SQL commands into SQL files that are input in psql commands * Minor logging facelift of the common test class
- Loading branch information
1 parent
6bb6867
commit 89d1b81
Showing
6 changed files
with
214 additions
and
137 deletions.
There are no files selected for viewing
This file contains 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 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,5 @@ | ||
CREATE TABLE persons (personid SERIAL, lastname VARCHAR(255), firstname VARCHAR(255), address VARCHAR(255), city VARCHAR(255)); | ||
INSERT INTO persons (lastname, firstname, address, city) VALUES ('Cavaille', 'Leo', 'Midtown', 'New York'), ('Someveryveryveryveryveryveryveryveryveryverylongname', 'something', 'Avenue des Champs Elysees', 'Beautiful city of lights'); | ||
SELECT * FROM persons; | ||
SELECT * FROM persons; | ||
SELECT * FROM persons; |
This file contains 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,7 @@ | ||
CREATE TABLE breed (id SERIAL, name VARCHAR(255)); | ||
CREATE TABLE kennel (id SERIAL, address VARCHAR(255)); | ||
INSERT INTO kennel (address) VALUES ('Midtown, New York'), ('Boston'); | ||
SELECT * FROM kennel; | ||
CREATE INDEX breed_names ON breed(name); | ||
INSERT INTO breed (name) VALUES ('Labrador Retriver'), ('German Shepherd'), ('Yorkshire Terrier'), ('Golden Retriever'), ('Bulldog'); | ||
SELECT * FROM breed WHERE name = 'Labrador'; |
This file contains 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,5 @@ | ||
CREATE USER datadog WITH PASSWORD 'datadog'; | ||
GRANT SELECT ON pg_stat_database TO datadog; | ||
CREATE DATABASE datadog_test; | ||
GRANT ALL PRIVILEGES ON DATABASE datadog_test TO datadog; | ||
CREATE DATABASE dogs; |
This file contains 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
Oops, something went wrong.