Improve path rule (#8623)

* Improve path rule

* Add nginx configuration tests

* Revert framework changes

* Add test to patched directives

* Fix root conf test

* Add comment in new function
This commit is contained in:
Ricardo Katz 2022-05-26 14:23:24 +01:00 committed by GitHub
parent 4dfb3f2e9a
commit bd1eb048b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 210 additions and 19 deletions

View file

@ -150,8 +150,9 @@ http {
f.NGINXWithConfigDeployment(SlowEchoService, cfg)
}
// NGINXWithConfigDeployment creates an NGINX deployment using a configmap containing the nginx.conf configuration
func (f *Framework) NGINXWithConfigDeployment(name string, cfg string) {
// NGINXDeployment creates a new simple NGINX Deployment using NGINX base image
// and passing the desired configuration
func (f *Framework) NGINXDeployment(name string, cfg string, waitendpoint bool) {
cfgMap := map[string]string{
"nginx.conf": cfg,
}
@ -213,8 +214,15 @@ func (f *Framework) NGINXWithConfigDeployment(name string, cfg string) {
f.EnsureService(service)
err = WaitForEndpoints(f.KubeClientSet, DefaultTimeout, name, f.Namespace, 1)
assert.Nil(ginkgo.GinkgoT(), err, "waiting for endpoints to become ready")
if waitendpoint {
err = WaitForEndpoints(f.KubeClientSet, DefaultTimeout, name, f.Namespace, 1)
assert.Nil(ginkgo.GinkgoT(), err, "waiting for endpoints to become ready")
}
}
// NGINXWithConfigDeployment creates an NGINX deployment using a configmap containing the nginx.conf configuration
func (f *Framework) NGINXWithConfigDeployment(name string, cfg string) {
f.NGINXDeployment(name, cfg, true)
}
// NewGRPCBinDeployment creates a new deployment of the