Add test for store helper ListIngresses
This commit is contained in:
parent
8179dfec0e
commit
c5932366db
2 changed files with 106 additions and 0 deletions
|
|
@ -617,16 +617,19 @@ func (s k8sStore) ListIngresses() []*extensions.Ingress {
|
|||
if !class.IsValid(ing) {
|
||||
continue
|
||||
}
|
||||
|
||||
for ri, rule := range ing.Spec.Rules {
|
||||
if rule.HTTP == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
for pi, path := range rule.HTTP.Paths {
|
||||
if path.Path == "" {
|
||||
ing.Spec.Rules[ri].HTTP.Paths[pi].Path = "/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ingresses = append(ingresses, ing)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue