Added code to prevent deletion of active fn pod (#1724)

Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
This commit is contained in:
Rahul Bhati
2020-09-28 14:09:55 +05:30
committed by GitHub
co-authored by Vishal
parent ef65602b79
commit c605d1d2c6
3 changed files with 16 additions and 10 deletions
+7 -3
View File
@@ -21,9 +21,9 @@ func TestPoolCache(t *testing.T) {
c.SetValue("func2", "ip22", "value22")
cc := c.ListValue()
if len(cc) != 3 {
log.Panicf("expected 2 items")
cc := c.ListAvailableValue()
if len(cc) != 0 {
log.Panicf("expected 0 available items")
}
active := c.GetTotalAvailable("func2")
if active != 2 {
@@ -33,7 +33,11 @@ func TestPoolCache(t *testing.T) {
c.DeleteValue("func2", "ip2")
c.MarkAvailable("func", "ip")
cc = c.ListAvailableValue()
if len(cc) != 1 {
log.Panic("expected 1 available items, received", len(cc))
}
_, err := c.GetValue("func")
checkErr(err)