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

Services/horizon: Integration tests for NETWORK parameter #4974

Merged
merged 13 commits into from
Aug 9, 2023

Conversation

urvisavla
Copy link
Contributor

@urvisavla urvisavla commented Jul 24, 2023

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with name of package that is most changed in the PR, ex.
    services/friendbot, or all or doc if the changes are broad or impact many
    packages.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated any docs (developer docs, .md
    files, etc... affected by this change). Take a look in the docs folder for a given service,
    like this one.

Release planning

  • I've updated the relevant CHANGELOG (here for Horizon) if
    needed with deprecations, added features, breaking changes, and DB schema changes.
  • I've decided if this PR requires a new major/minor version according to
    semver, or if it's mainly a patch change. The PR is targeted at the next
    release branch if it's not a patch change.

What

Introduce integration tests to verify that Horizon starts successfully with the default configuration when the NETWORK parameter is set to either "pubnet" or "testnet". The tests cover Network parameter using both command-line argument and environment variable. Added support to skip starting core containers for running these tests.

Updated the StartHorizon() function to return the error instead of just exiting. Updated the existing test that was affected by it.

Fixed an issue in an existing test where it failed to clean up the environment variable properly.

Why

closes #4967

Known limitations

Typically during integration tests, we initiate Horizon in standalone mode and simultaneously start the stellar-core container in standalone mode as well. We wait for Horizon to begin ingesting to verify the test's success. However, in the case of "pubnet" or "testnet," waiting for Horizon to start ingesting is not practical. As a result, we run only validate that the Horizon successfully starts the captive-core subprocess using the default configuration.

@urvisavla urvisavla force-pushed the params-integration-tests branch 5 times, most recently from 7b28b9f to 6ad3e7d Compare July 24, 2023 19:42
@urvisavla urvisavla marked this pull request as ready for review July 24, 2023 20:30
@urvisavla urvisavla force-pushed the params-integration-tests branch 2 times, most recently from cc2a142 to c683ac3 Compare July 28, 2023 20:07
@urvisavla urvisavla force-pushed the params-integration-tests branch from 5f926c6 to 42d20e0 Compare August 7, 2023 23:33
@urvisavla urvisavla requested review from tamirms and sreuland August 8, 2023 04:20
@urvisavla urvisavla force-pushed the params-integration-tests branch from c36e824 to b5ea885 Compare August 8, 2023 17:17
Copy link
Contributor

@sreuland sreuland left a comment

Choose a reason for hiding this comment

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

the new test coverage looks good, i just left a few minor suggestions here to consider before merge.

@urvisavla urvisavla merged commit 8aaa141 into stellar:master Aug 9, 2023
@urvisavla urvisavla deleted the params-integration-tests branch August 9, 2023 23:32
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.

services/horizon: Add integration tests for testing default configuration using NETWORK parameter
4 participants