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

test: run supported tests with emulators #1564

Open
wants to merge 28 commits into
base: dev
Choose a base branch
from

Conversation

hallvictoria
Copy link
Contributor

@hallvictoria hallvictoria commented Aug 16, 2024

Description

Converts blob, table, queue, generic, and event hub tests to run using emulators.
Updates CODEOWNERS file, adds retries for flaky unit tests.

  • Adds a new workflow for running these tests: ci-emulator-tests.yml
    • This workflow will run as part of the public build and official build
    • It can be run as part of the public build because it doesn't have any secrets
    • It can also be run with sdk and extensions releases
  • Refactors these tests into a new emulator_tests folder
    • This means that those tests will no longer interact with prod resources and skips them for the E2E tests
  • Starts the emulators through tests/emulator_tests/utils/docker-compose.yml
    • This docker-compose file starts both the Azurite storage emulator and the EventHub emulator in a single place
  • Generic tests can be run with emulators because they use table storage
  • Deferred binding blob tests require a connection string to run properly and cannot be run using emulators
  • EventHub emulator support:
    • Event Hub resources defined in Config.json
    • Emulator started in docker-compose.yml
  • Note: two separate ci-emulator-tests.yml files
    • A linux pool is required to spin up the Docker container
    • For official-build, the top level pool must be windows. To run a job using a linux pool as part of the official-build, it must be defined in the job template (example: docker consumption & dedicated tests)
    • There is a different pool for public and internal, and pools can't be mixed between orgs (public pool can't be used in an internal pipeline and vice versa)
    • Conditionally setting or using a variable to set the pool is not allowed in the internal org (Validate Hosted Pool Information stage fails)
    • Therefore, the only way to run tests that require a linux pool in both the official and public builds is to create two separate templates

Fixes #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

@hallvictoria hallvictoria changed the title test: run emulators for blob, table, queue tests test: run supported tests with emulators Aug 16, 2024
@hallvictoria hallvictoria marked this pull request as ready for review September 3, 2024 17:38
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