Update lua configuration_data when number of controller pod change
This commit is contained in:
parent
55b4f00368
commit
f90881b367
10 changed files with 113 additions and 19 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue