Update lua configuration_data when number of controller pod change

This commit is contained in:
Maxime Ginters 2018-11-27 09:53:51 -05:00
parent 55b4f00368
commit f90881b367
10 changed files with 113 additions and 19 deletions

View file

@ -1062,7 +1062,7 @@ func TestWriteSSLSessionTicketKey(t *testing.T) {
}
}
func TestListControllerPods(t *testing.T) {
func TestGetRunningControllerPodsCount(t *testing.T) {
os.Setenv("POD_NAMESPACE", "testns")
os.Setenv("POD_NAME", "ingress-1")
@ -1117,8 +1117,8 @@ func TestListControllerPods(t *testing.T) {
}
s.listers.Pod.Add(pod)
pods := s.ListControllerPods()
if s := len(pods); s != 2 {
podsCount := s.GetRunningControllerPodsCount()
if podsCount != 2 {
t.Errorf("Expected 1 controller Pods but got %v", s)
}
}