Skip to content

test(datasets): Make test API functions more generic#366

Merged
manuzope merged 1 commit intomasterfrom
configurable-test-functions
Jul 22, 2019
Merged

test(datasets): Make test API functions more generic#366
manuzope merged 1 commit intomasterfrom
configurable-test-functions

Conversation

@manuzope
Copy link
Contributor

@manuzope manuzope commented Jul 17, 2019

This commit introduces three new endpoints:

  • /tests/<datastream>/insert
  • /tests/<datastream>/eventstream
  • /tests/<datastream>/drop

These are more generic versions of existing endpoints (/tests/insert, /tests/eventstream, /tests/drop). The existing endpoints only work for the events dataset. The goal of the new endpoints is that they work for any dataset.

Once github.com/getsentry/sentry is updated to use the new endpoints, the old endpoints will be removed.

@manuzope manuzope force-pushed the configurable-test-functions branch from 2180cf3 to 8e5c313 Compare July 17, 2019 22:02
@manuzope manuzope requested a review from a team July 17, 2019 22:12
@manuzope manuzope force-pushed the configurable-test-functions branch from 8e5c313 to 9c9b3d5 Compare July 17, 2019 23:00
Copy link
Contributor

@fpacifici fpacifici left a comment

Choose a reason for hiding this comment

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

Seems good to me. These endpoints are all for tests.
Please merge master or rebase since your code may not merge cleanly now.

Please run the sentry tests then I can accept:
https://github.com/getsentry/snuba#testing-against-sentry

These are the test that use these endpoints.

@manuzope manuzope force-pushed the configurable-test-functions branch from 9c9b3d5 to fab2ad7 Compare July 18, 2019 23:30
@manuzope
Copy link
Contributor Author

Great. The tests look happy.

$ USE_SNUBA=1 make test-acceptance
103 passed, 4 skipped in 725.50 seconds

$ USE_SNUBA=1 make test-snuba
373 passed, 5 xfailed, 2 xpassed in 197.19 seconds

$ make test-python
4874 passed, 4 skipped, 7 xfailed, 4 xpassed, 2 warnings in 657.71 seconds

This commit introduces three new endpoints:
- `/tests/<datastream>/insert`
- `/tests/<datastream>/eventstream`
- `/tests/<datastream>/drop`

These are more generic version of existing endpoints (`/tests/drop`,
`/tests/eventstream`, `/tests/insert`). The existing endpoints only
work for the events dataset. The new endpoints will work on any
dataset.

Once github.com/getsentry/sentry is updated to use the new endpoints,
the old endpoints will be removed.
@manuzope manuzope force-pushed the configurable-test-functions branch from fab2ad7 to e900d17 Compare July 22, 2019 19:01
@manuzope manuzope merged commit b89cbd6 into master Jul 22, 2019
@manuzope manuzope deleted the configurable-test-functions branch July 22, 2019 22:30
manuzope pushed a commit to getsentry/sentry that referenced this pull request Jul 23, 2019
When we run tests in Sentry that hit Snuba, we insert records and delete the database at the end of every test run. We do this using the following test endpoints in Snuba:
* `/tests/insert`
* `/tests/eventstream`
* `/tests/drop`

These endpoints only worked for the `events` dataset. We want it to work for any dataset.

So, getsentry/snuba#366 introduced 3 new test endpoints to Snuba with the goal of replacing the 3 endpoints mentioned earlier:
* `/tests/<datastream>/insert`
* `/tests/<datastream>/eventstream`
* `/tests/<datastream>/drop`

This PR makes Sentry use the new endpoints in Snuba. The next step is to remove the old non-generic endpoints from Snuba.
manuzope pushed a commit to getsentry/sentry that referenced this pull request Jul 23, 2019
When we run tests in Sentry that hit Snuba, we insert records and delete the database at the end of every test run. We do this using the following test endpoints in Snuba:
* `/tests/insert`
* `/tests/eventstream`
* `/tests/drop`

These endpoints only worked for the `events` dataset. We want it to work for any dataset.

So, getsentry/snuba#366 introduced 3 new test endpoints to Snuba with the goal of replacing the 3 endpoints mentioned earlier:
* `/tests/<datastream>/insert`
* `/tests/<datastream>/eventstream`
* `/tests/<datastream>/drop`

This PR makes Sentry use the new endpoints in Snuba. The next step is to remove the old non-generic endpoints from Snuba.
manuzope pushed a commit to getsentry/sentry that referenced this pull request Jul 23, 2019
When we run tests in Sentry that hit Snuba, we insert records and delete the database at the end of every test run. We do this using the following test endpoints in Snuba:
* `/tests/insert`
* `/tests/eventstream`
* `/tests/drop`

These endpoints only worked for the `events` dataset. We want it to work for any dataset.

So, getsentry/snuba#366 introduced 3 new test endpoints to Snuba with the goal of replacing the 3 endpoints mentioned earlier:
* `/tests/<datastream>/insert`
* `/tests/<datastream>/eventstream`
* `/tests/<datastream>/drop`

This PR makes Sentry use the new endpoints in Snuba. The next step is to remove the old non-generic endpoints from Snuba.
manuzope pushed a commit that referenced this pull request Jul 24, 2019
* #366 introduced more generic test endpoints
* getsentry/sentry#14111 made Sentry use those generic test endpoints

This PR removes the old non-generic test endpoints.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants