Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: get test name automatically for remote storage #5184

Merged
merged 1 commit into from Sep 1, 2023

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Sep 1, 2023

Problem

Tests using remote storage have manually entered test_name parameters, which:

  • Are easy to accidentally duplicate when copying code to make a new test
  • Omit parameters, so don't actually create unique S3 buckets when running many tests concurrently.

Summary of changes

  • Use the request fixture in neon_env_builder fixture to get the test name, then munge that into an S3 compatible bucket name.
  • Remove the explicit test_name parameters to enable_remote_storage

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

@jcsp jcsp added a/test Area: related to testing a/tech_debt Area: related to tech debt labels Sep 1, 2023
@jcsp jcsp requested a review from bayandin September 1, 2023 16:07
@neondatabase neondatabase deleted a comment from github-actions bot Sep 1, 2023
@jcsp jcsp marked this pull request as ready for review September 1, 2023 16:08
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

1624 tests run: 1551 passed, 0 failed, 73 skipped (full report)


The comment gets automatically updated with the latest test results
cf2a757 at 2023-09-01T16:13:08.282Z :recycle:

@jcsp jcsp merged commit 41aa627 into main Sep 1, 2023
33 checks passed
@jcsp jcsp deleted the jcsp/auto-test-name branch September 1, 2023 16:29
jcsp added a commit that referenced this pull request Sep 4, 2023
## Problem

Tests using remote storage have manually entered `test_name` parameters,
which:
- Are easy to accidentally duplicate when copying code to make a new
test
- Omit parameters, so don't actually create unique S3 buckets when
running many tests concurrently.

## Summary of changes

- Use the `request` fixture in neon_env_builder fixture to get the test
name, then munge that into an S3 compatible bucket name.
- Remove the explicit `test_name` parameters to enable_remote_storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/tech_debt Area: related to tech debt a/test Area: related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants