Move the resetting logic into framework
Stylistic fixes based on feedback
This commit is contained in:
parent
19337f05fb
commit
444914b764
4 changed files with 22 additions and 47 deletions
|
|
@ -35,25 +35,16 @@ var _ = framework.IngressNginxDescribe("Proxy Protocol", func() {
|
|||
f := framework.NewDefaultFramework("proxy-protocol")
|
||||
|
||||
setting := "use-proxy-protocol"
|
||||
var defaultNginxConfigMapData map[string]string = nil
|
||||
|
||||
BeforeEach(func() {
|
||||
err := f.NewEchoDeployment()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
if defaultNginxConfigMapData == nil {
|
||||
defaultNginxConfigMapData, err = f.GetNginxConfigMapData()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(defaultNginxConfigMapData).NotTo(BeNil())
|
||||
}
|
||||
|
||||
err = f.UpdateNginxConfigMapData(setting, "false")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
err := f.SetNginxConfigMapData(defaultNginxConfigMapData)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
|
||||
It("should respect port passed by the PROXY Protocol", func() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue