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

Introduce integration test #21

Merged
merged 5 commits into from
May 12, 2024
Merged

Introduce integration test #21

merged 5 commits into from
May 12, 2024

Conversation

lavenderses
Copy link
Owner

What

Introduce integration test

close #14

How

A. Implement application server which serves flag value by request parameter.

This is :integration-test:app module.
Application server is implemented with Armeria.

B. Add integration test as :integration-test:testing module

Test requestes to above server by client implemented with Armeria.

Integration test can be executed localy by following operation. See also this document.

https://github.com/lavenderses/AWSAppConfig-OpenFeature-provider-java/blob/e426b4f3a2e1f4483d610ddcac017214583c5600/integration-test/README.md?plain=1#L11-L37

C. Run AWS AppConfig agent and server in docker-compose.

AWS AppConfig agent runs on 2772:2772 port. This agent watches file /integration-test/testing/src/test/resources/app:env:profile and serves flags from the file.
If you change the content in the file while running this container, you will get new flag value without restarting the container after a while (about 1 min).

An above application server runs on 8080:8080. If you request to GET /{agentType}/booleanFlag?key={key}&defaultValue={defaultValue} or any other endpoint, you can get feature flag value.

This integration test also looks the endpoint, and compare the flag value with expectation.

Notes

  • Integration test won't be executed on CI
    • see .github/workflows/ci.yaml
  • GitHub Actions to execute integration test will be introduced

@lavenderses lavenderses added the testing Fix / improvement related to test label May 12, 2024
@lavenderses lavenderses self-assigned this May 12, 2024
Copy link
Owner Author

@lavenderses lavenderses left a comment

Choose a reason for hiding this comment

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

LGTM

@lavenderses lavenderses merged commit 7745f7d into main May 12, 2024
4 checks passed
@lavenderses lavenderses deleted the lavenderses/issue-14 branch May 12, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Fix / improvement related to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add integration test for getting feature flag value
1 participant