Skip to content

Add support for multiple gateways #3275

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

Merged
merged 19 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update timeout duration for all tests
  • Loading branch information
salonichf5 committed Apr 16, 2025
commit e4caf7808605e21a66a9326890a1ac8e7e6a4961
8 changes: 4 additions & 4 deletions tests/suite/graceful_recovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
var err error
Eventually(
func() bool {
nginxPodNames, err = framework.GetReadyNginxPodNames(k8sClient, ns.Name, timeoutConfig.GetTimeout)
nginxPodNames, err = framework.GetReadyNginxPodNames(k8sClient, ns.Name, timeoutConfig.GetStatusTimeout)
return len(nginxPodNames) == 1 && err == nil
}).
WithTimeout(timeoutConfig.CreateTimeout).
Expand Down Expand Up @@ -310,7 +310,7 @@
var nginxPodNames []string
Eventually(
func() bool {
nginxPodNames, err = framework.GetReadyNginxPodNames(k8sClient, ns.Name, timeoutConfig.GetTimeout)
nginxPodNames, err = framework.GetReadyNginxPodNames(k8sClient, ns.Name, timeoutConfig.GetStatusTimeout)
return len(nginxPodNames) == 1 && err == nil
}).
WithTimeout(timeoutConfig.CreateTimeout * 2).
Expand Down Expand Up @@ -400,7 +400,7 @@
Expect(resourceManager.ApplyFromFiles(files, ns.Name)).To(Succeed())
Expect(resourceManager.WaitForAppsToBeReady(ns.Name)).To(Succeed())

nginxPodNames, err := framework.GetReadyNginxPodNames(k8sClient, ns.Name, timeoutConfig.GetTimeout)
nginxPodNames, err := framework.GetReadyNginxPodNames(k8sClient, ns.Name, timeoutConfig.GetStatusTimeout)
Expect(err).ToNot(HaveOccurred())
Expect(nginxPodNames).To(HaveLen(1))

Expand Down Expand Up @@ -433,7 +433,7 @@
It("recovers when nginx container is restarted", func() {
restartNginxContainer(activeNginxPodName, ns.Name, nginxContainerName)

nginxPodNames, err := framework.GetReadyNginxPodNames(k8sClient, ns.Name, timeoutConfig.GetTimeout)
nginxPodNames, err := framework.GetReadyNginxPodNames(k8sClient, ns.Name, timeoutConfig.GetStatusTimeout)
Expect(err).ToNot(HaveOccurred())
Expect(nginxPodNames).To(HaveLen(1))
activeNginxPodName = nginxPodNames[0]
Expand Down Expand Up @@ -512,7 +512,7 @@

It("recovers when node is restarted abruptly", func() {
if *plusEnabled {
Skip(fmt.Sprintf("Skipping test when using NGINX Plus due to known issue:" +

Check notice on line 515 in tests/suite/graceful_recovery_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (plus, v1.32.2) / Run Tests

It 04/16/25 08:30:12.472

Check notice on line 515 in tests/suite/graceful_recovery_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (plus, v1.25.16) / Run Tests

It 04/16/25 08:31:13.01
" https://github.com/nginx/nginx-gateway-fabric/issues/3248"))
}
runRestartNodeAbruptlyTest(teaURL, coffeeURL, files, &ns)
Expand Down
2 changes: 1 addition & 1 deletion tests/suite/tracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ var _ = Describe("Tracing", FlakeAttempts(2), Ordered, Label("functional", "trac
Expect(resourceManager.ApplyFromFiles(files, namespace)).To(Succeed())
Expect(resourceManager.WaitForAppsToBeReady(namespace)).To(Succeed())

nginxPodNames, err := framework.GetReadyNginxPodNames(k8sClient, namespace, timeoutConfig.GetTimeout)
nginxPodNames, err := framework.GetReadyNginxPodNames(k8sClient, namespace, timeoutConfig.GetStatusTimeout)
Expect(err).ToNot(HaveOccurred())
Expect(nginxPodNames).To(HaveLen(1))

Expand Down
2 changes: 1 addition & 1 deletion tests/suite/upstream_settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@

Expect(resourceManager.Apply([]client.Object{ns})).To(Succeed())
Expect(resourceManager.ApplyFromFiles(files, namespace)).To(Succeed())
Expect(resourceManager.WaitForAppsToBeReady(namespace)).To(Succeed())

Check failure on line 52 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

BeforeAll 04/16/25 08:37:45.651

Check failure on line 52 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (plus, v1.25.16) / Run Tests

BeforeAll 04/16/25 08:35:56.384

nginxPodNames, err := framework.GetReadyNginxPodNames(k8sClient, namespace, timeoutConfig.GetTimeout)
nginxPodNames, err := framework.GetReadyNginxPodNames(k8sClient, namespace, timeoutConfig.GetStatusTimeout)
Expect(err).ToNot(HaveOccurred())
Expect(nginxPodNames).To(HaveLen(1))

Expand Down Expand Up @@ -99,7 +99,7 @@
})

Context("verify working traffic", func() {
It("should return a 200 response for HTTPRoutes", func() {

Check notice on line 102 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

It 04/16/25 08:37:56.658
port := 80
if portFwdPort != 0 {
port = portFwdPort
Expand Down Expand Up @@ -140,7 +140,7 @@
Expect(framework.ValidateNginxFieldExists(conf, expCfg)).To(Succeed())
}
},
Entry("HTTP upstreams", []framework.ExpectedNginxField{

Check notice on line 143 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

It 04/16/25 08:37:56.658
{
Directive: "upstream",
Value: "uspolicy_coffee_80",
Expand Down Expand Up @@ -212,7 +212,7 @@
File: "http.conf",
},
}),
Entry("GRPC upstreams", []framework.ExpectedNginxField{

Check notice on line 215 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

It 04/16/25 08:37:56.658
{
Directive: "upstream",
Value: "uspolicy_grpc-backend_8080",
Expand Down Expand Up @@ -271,15 +271,15 @@
uspolicyNsName := types.NamespacedName{Name: name, Namespace: namespace}
Expect(waitForUSPolicyStatus(uspolicyNsName, gatewayName, status, condReason)).To(Succeed())
},
Entry("uspolicy merge-usp-1", "merge-usp-1", metav1.ConditionTrue, v1alpha2.PolicyReasonAccepted),

Check notice on line 274 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

It 04/16/25 08:37:56.658
Entry("uspolicy merge-usp-2", "merge-usp-2", metav1.ConditionTrue, v1alpha2.PolicyReasonAccepted),

Check notice on line 275 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

It 04/16/25 08:37:56.658
Entry("uspolicy merge-usp-3", "z-merge-usp-3", metav1.ConditionFalse, v1alpha2.PolicyReasonConflicted),

Check notice on line 276 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

It 04/16/25 08:37:56.658
Entry("uspolicy a-usp-wins", "a-usp-wins", metav1.ConditionTrue, v1alpha2.PolicyReasonAccepted),

Check notice on line 277 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

It 04/16/25 08:37:56.658
Entry("uspolicy z-usp", "z-usp", metav1.ConditionFalse, v1alpha2.PolicyReasonConflicted),

Check notice on line 278 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

It 04/16/25 08:37:56.658
)

Context("verify working traffic", func() {
It("should return a 200 response for HTTPRoutes", func() {

Check notice on line 282 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

It 04/16/25 08:37:56.658
port := 80
if portFwdPort != 0 {
port = portFwdPort
Expand Down Expand Up @@ -320,7 +320,7 @@
Expect(framework.ValidateNginxFieldExists(conf, expCfg)).To(Succeed())
}
},
Entry("Coffee upstream", []framework.ExpectedNginxField{

Check notice on line 323 in tests/suite/upstream_settings_test.go

View workflow job for this annotation

GitHub Actions / Functional tests (nginx, v1.25.16) / Run Tests

It 04/16/25 08:37:56.658
{
Directive: "upstream",
Value: "uspolicy_coffee_80",
Expand Down
Loading