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

Add crossplane framework for testing #2522

Merged
merged 4 commits into from
Sep 25, 2024
Merged

Add crossplane framework for testing #2522

merged 4 commits into from
Sep 25, 2024

Conversation

sjberman
Copy link
Collaborator

@sjberman sjberman commented Sep 9, 2024

Problem: We want a way to verify nginx configuration reliably in our tests. This is especially useful when introducing new policies, without the desire for testing nginx functionality directly.

Solution: Added a framework for getting the nginx config and passing through crossplane into a structured JSON format for easier parsing.

Because we now use a local container for crossplane in our functional tests, we'll only support running these tests in a kind cluster.

Closes #2014

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

NONE

Copy link
Contributor

github-actions bot commented Sep 9, 2024

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@github-actions github-actions bot added documentation Improvements or additions to documentation tests Pull requests that update tests labels Sep 9, 2024
@sjberman sjberman removed the documentation Improvements or additions to documentation label Sep 9, 2024
@sjberman
Copy link
Collaborator Author

sjberman commented Sep 9, 2024

I have hereby read the F5 CLA and agree to its terms

Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.20%. Comparing base (3af2393) to head (dbcd3d2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2522   +/-   ##
=======================================
  Coverage   89.20%   89.20%           
=======================================
  Files         100      100           
  Lines        7642     7642           
  Branches       50       50           
=======================================
  Hits         6817     6817           
  Misses        768      768           
  Partials       57       57           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 9, 2024
@sjberman sjberman removed the documentation Improvements or additions to documentation label Sep 9, 2024
@sjberman sjberman marked this pull request as ready for review September 9, 2024 18:37
@sjberman sjberman requested a review from a team as a code owner September 9, 2024 18:37
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 9, 2024
@sjberman sjberman removed the documentation Improvements or additions to documentation label Sep 9, 2024
Copy link
Contributor

@kate-osborn kate-osborn left a comment

Choose a reason for hiding this comment

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

This is awesome 😎

tests/framework/crossplane.go Outdated Show resolved Hide resolved
tests/framework/crossplane.go Outdated Show resolved Hide resolved
tests/framework/crossplane.go Outdated Show resolved Hide resolved
tests/framework/crossplane.go Outdated Show resolved Hide resolved
tests/framework/crossplane.go Show resolved Hide resolved
tests/framework/crossplane.go Show resolved Hide resolved
tests/framework/resourcemanager.go Show resolved Hide resolved
tests/suite/client_settings_test.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 9, 2024
tests/Dockerfile.crossplane Outdated Show resolved Hide resolved
tests/README.md Show resolved Hide resolved
Problem: We want a way to verify nginx configuration reliably in our tests. This is especially useful when introducing new policies, without the desire for testing nginx functionality directly.

Solution: Added a framework for getting the nginx config and passing through crossplane into a structured JSON format for easier parsing.

Because we now use a local container for crossplane in our functional tests, we'll only support running these tests in a kind cluster.
@github-actions github-actions bot removed the tests Pull requests that update tests label Sep 24, 2024
Copy link
Contributor

@kate-osborn kate-osborn left a comment

Choose a reason for hiding this comment

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

🚀

@sjberman sjberman merged commit 731ad90 into main Sep 25, 2024
38 checks passed
@sjberman sjberman deleted the tests/nginx-config branch September 25, 2024 20:00
salonichf5 pushed a commit that referenced this pull request Oct 8, 2024
Problem: We want a way to verify nginx configuration reliably in our tests. This is especially useful when introducing new policies, without the desire for testing nginx functionality directly.

Solution: Added a framework for getting the nginx config and passing through crossplane into a structured JSON format for easier parsing.

Because we now use a local container for crossplane in our functional tests, we'll only support running these tests in a kind cluster.
miledxz added a commit to miledxz/nginx-gateway-fabric that referenced this pull request Jan 14, 2025
Problem: We want a way to verify nginx configuration reliably in our tests. This is especially useful when introducing new policies, without the desire for testing nginx functionality directly.

Solution: Added a framework for getting the nginx config and passing through crossplane into a structured JSON format for easier parsing.

Because we now use a local container for crossplane in our functional tests, we'll only support running these tests in a kind cluster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verify nginx config in functional tests
3 participants