@@ -30,17 +30,27 @@ func (suite *MapUpdateSuite) Test_Update() {
30
30
suite .tmplData .Paths = append (suite .tmplData .Paths , strconv .Itoa (i ))
31
31
}
32
32
oldInfo , err := e2e .GetGlobalHAProxyInfo ()
33
- oldCount , err := e2e .GetHAProxyMapCount ("path-prefix" )
33
+ oldCountExact , err := e2e .GetHAProxyMapCount ("path-exact" )
34
+ suite .Require ().NoError (err )
35
+ oldCountPrefixExact , err := e2e .GetHAProxyMapCount ("path-prefix-exact" )
36
+ suite .Require ().NoError (err )
37
+ oldCountPrefix , err := e2e .GetHAProxyMapCount ("path-prefix" )
34
38
suite .Require ().NoError (err )
35
39
suite .Require ().NoError (suite .test .Apply ("config/ingress.yaml.tmpl" , suite .test .GetNS (), suite .tmplData ))
36
40
suite .Require ().Eventually (func () bool {
37
41
newInfo , err := e2e .GetGlobalHAProxyInfo ()
38
42
suite .Require ().NoError (err )
39
- count , err := e2e .GetHAProxyMapCount ("path-prefix" )
43
+ countExact , err := e2e .GetHAProxyMapCount ("path-exact" )
44
+ suite .Require ().NoError (err )
45
+ countPrefixExact , err := e2e .GetHAProxyMapCount ("path-prefix-exact" )
46
+ suite .Require ().NoError (err )
47
+ countPrefix , err := e2e .GetHAProxyMapCount ("path-prefix" )
40
48
suite .Require ().NoError (err )
41
- numOfAddedEntries := count - oldCount + 1 // We add one because there's already an entry at the begining which will be removed
42
- suite .T ().Logf ("oldInfo.Pid(%s) == newInfo.Pid(%s) && additional path-prefix.count(%d) == %d" , oldInfo .Pid , newInfo .Pid , numOfAddedEntries , n )
43
- return oldInfo .Pid == newInfo .Pid && numOfAddedEntries == n
49
+ numOfAddedEntriesExact := countExact - oldCountExact
50
+ numOfAddedEntriesPrefixExact := countPrefixExact - oldCountPrefixExact
51
+ numOfAddedEntriesPrefix := countPrefix - oldCountPrefix + 1 // We add one because there's already an entry at the beginning which will be removed
52
+ suite .T ().Logf ("oldInfo.Pid(%s) == newInfo.Pid(%s) && additional path-exact.count(%d) == %d && additional path-prefix-exact.count(%d) == %d && additional path-prefix.count(%d) == %d" , oldInfo .Pid , newInfo .Pid , numOfAddedEntriesExact , 0 , numOfAddedEntriesPrefixExact , n , numOfAddedEntriesPrefix , n )
53
+ return oldInfo .Pid == newInfo .Pid && numOfAddedEntriesExact == 0 && numOfAddedEntriesPrefixExact == n && numOfAddedEntriesPrefix == n
44
54
}, e2e .WaitDuration , e2e .TickDuration )
45
55
})
46
56
}
0 commit comments