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 functional tests for ClientSettingsPolicies #2013

Merged
merged 7 commits into from
May 29, 2024

Conversation

kate-osborn
Copy link
Contributor

@kate-osborn kate-osborn commented May 22, 2024

Proposed changes

Problem: No automated functional tests for ClientSettingsPolicies.

Solution: Add functional tests for ClientSettingsPolicies.

Test Cases:

  • NGF writes the correct status on policies
    • Valid policies are accepted
    • Conflicting policies are marked as conflicted
    • Invalid policies are not accepted
  • NGF propagates the body.maxSize setting in the NGINX config. This is the only field in ClientSettingsPolicy that we can test e2e by sending traffic.

Closes #1762

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.


@github-actions github-actions bot added the tests Pull requests that update tests label May 22, 2024
@kate-osborn kate-osborn force-pushed the tests/client-settings branch from 1c222f1 to 663dfc1 Compare May 22, 2024 21:25
@kate-osborn kate-osborn marked this pull request as ready for review May 22, 2024 21:25
@kate-osborn kate-osborn requested a review from a team as a code owner May 22, 2024 21:25
@kate-osborn kate-osborn changed the title DRAFT- testing Add functional tests for ClientSettingsPolicies May 22, 2024
tests/suite/client_settings_test.go Outdated Show resolved Hide resolved
tests/suite/client_settings_test.go Outdated Show resolved Hide resolved
tests/suite/client_settings_test.go Outdated Show resolved Hide resolved
@kate-osborn kate-osborn requested a review from sjberman May 23, 2024 16:52
@kate-osborn kate-osborn force-pushed the tests/client-settings branch from d28e1db to 519b736 Compare May 23, 2024 16:58
tests/suite/client_settings_test.go Outdated Show resolved Hide resolved
tests/suite/client_settings_test.go Show resolved Hide resolved
tests/suite/client_settings_test.go Show resolved Hide resolved
@kate-osborn kate-osborn requested a review from pleshakov May 28, 2024 14:22
@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 28, 2024
@kate-osborn kate-osborn force-pushed the tests/client-settings branch from ec85a47 to 4f9956f Compare May 28, 2024 16:14
@kate-osborn kate-osborn requested a review from sjberman May 28, 2024 16:14
tests/go.mod Outdated Show resolved Hide resolved
@kate-osborn kate-osborn force-pushed the tests/client-settings branch 2 times, most recently from bf09b75 to 23a8513 Compare May 28, 2024 19:14
@kate-osborn kate-osborn requested a review from lucacome May 28, 2024 19:17
@kate-osborn kate-osborn force-pushed the tests/client-settings branch from 23a8513 to d8c2a9b Compare May 28, 2024 19:19
@kate-osborn kate-osborn force-pushed the tests/client-settings branch from d8c2a9b to 588f3d2 Compare May 28, 2024 20:02
@kate-osborn kate-osborn force-pushed the tests/client-settings branch from 9c1c6fb to 2a40745 Compare May 28, 2024 22:04
@kate-osborn kate-osborn merged commit 7281d3c into nginx:main May 29, 2024
40 checks passed
miledxz added a commit to miledxz/nginx-gateway-fabric that referenced this pull request Jan 14, 2025
Problem: No automated functional tests for ClientSettingsPolicies.

Solution: Add functional tests for ClientSettingsPolicies.

Test Cases:

- NGF writes the correct status on policies
  - Valid policies are accepted
  - Conflicting policies are marked as conflicted
  - Invalid policies are not accepted
- NGF propagates the body.maxSize setting in the NGINX config. This is the only field in ClientSettingsPolicy that we can test e2e by sending traffic.
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 tests Pull requests that update tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add automated functional tests for ClientSettingsPolicy
5 participants