Spelling
This commit is contained in:
parent
fe65e9d22f
commit
a8728f3d2c
38 changed files with 1120 additions and 1120 deletions
|
|
@ -147,7 +147,7 @@ func TestIngressAuth(t *testing.T) {
|
|||
|
||||
i, err := NewParser(dir, &mockSecret{}).Parse(ing)
|
||||
if err != nil {
|
||||
t.Errorf("Uxpected error with ingress: %v", err)
|
||||
t.Errorf("Unexpected error with ingress: %v", err)
|
||||
}
|
||||
auth, ok := i.(*Config)
|
||||
if !ok {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ func TestAnnotations(t *testing.T) {
|
|||
fakeSecret := &mockSecret{}
|
||||
i, err := NewParser(fakeSecret).Parse(ing)
|
||||
if err != nil {
|
||||
t.Errorf("Uxpected error with ingress: %v", err)
|
||||
t.Errorf("Unexpected error with ingress: %v", err)
|
||||
}
|
||||
|
||||
u, ok := i.(*Config)
|
||||
|
|
@ -163,7 +163,7 @@ func TestInvalidAnnotations(t *testing.T) {
|
|||
|
||||
i, err := NewParser(fakeSecret).Parse(ing)
|
||||
if err != nil {
|
||||
t.Errorf("Uxpected error with ingress: %v", err)
|
||||
t.Errorf("Unexpected error with ingress: %v", err)
|
||||
}
|
||||
u, ok := i.(*Config)
|
||||
if !ok {
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ func TestAnnotations(t *testing.T) {
|
|||
fakeSecret := &mockSecret{}
|
||||
i, err := NewParser(fakeSecret).Parse(ing)
|
||||
if err != nil {
|
||||
t.Errorf("Uxpected error with ingress: %v", err)
|
||||
t.Errorf("Unexpected error with ingress: %v", err)
|
||||
}
|
||||
|
||||
u, ok := i.(*Config)
|
||||
|
|
@ -175,7 +175,7 @@ func TestInvalidAnnotations(t *testing.T) {
|
|||
|
||||
i, err := NewParser(fakeSecret).Parse(ing)
|
||||
if err != nil {
|
||||
t.Errorf("Uxpected error with ingress: %v", err)
|
||||
t.Errorf("Unexpected error with ingress: %v", err)
|
||||
}
|
||||
u, ok := i.(*Config)
|
||||
if !ok {
|
||||
|
|
|
|||
|
|
@ -134,28 +134,28 @@ func TestRateLimiting(t *testing.T) {
|
|||
t.Errorf("expected a RateLimit type")
|
||||
}
|
||||
if rateLimit.Connections.Limit != 5 {
|
||||
t.Errorf("expected 5 in limit by ip but %v was returend", rateLimit.Connections)
|
||||
t.Errorf("expected 5 in limit by ip but %v was returned", rateLimit.Connections)
|
||||
}
|
||||
if rateLimit.Connections.Burst != 5*5 {
|
||||
t.Errorf("expected %d in burst limit by ip but %v was returend", 5*3, rateLimit.Connections)
|
||||
t.Errorf("expected %d in burst limit by ip but %v was returned", 5*3, rateLimit.Connections)
|
||||
}
|
||||
if rateLimit.RPS.Limit != 100 {
|
||||
t.Errorf("expected 100 in limit by rps but %v was returend", rateLimit.RPS)
|
||||
t.Errorf("expected 100 in limit by rps but %v was returned", rateLimit.RPS)
|
||||
}
|
||||
if rateLimit.RPS.Burst != 100*5 {
|
||||
t.Errorf("expected %d in burst limit by rps but %v was returend", 100*3, rateLimit.RPS)
|
||||
t.Errorf("expected %d in burst limit by rps but %v was returned", 100*3, rateLimit.RPS)
|
||||
}
|
||||
if rateLimit.RPM.Limit != 10 {
|
||||
t.Errorf("expected 10 in limit by rpm but %v was returend", rateLimit.RPM)
|
||||
t.Errorf("expected 10 in limit by rpm but %v was returned", rateLimit.RPM)
|
||||
}
|
||||
if rateLimit.RPM.Burst != 10*5 {
|
||||
t.Errorf("expected %d in burst limit by rpm but %v was returend", 10*3, rateLimit.RPM)
|
||||
t.Errorf("expected %d in burst limit by rpm but %v was returned", 10*3, rateLimit.RPM)
|
||||
}
|
||||
if rateLimit.LimitRateAfter != 100 {
|
||||
t.Errorf("expected 100 in limit by limitrateafter but %v was returend", rateLimit.LimitRateAfter)
|
||||
t.Errorf("expected 100 in limit by limitrateafter but %v was returned", rateLimit.LimitRateAfter)
|
||||
}
|
||||
if rateLimit.LimitRate != 10 {
|
||||
t.Errorf("expected 10 in limit by limitrate but %v was returend", rateLimit.LimitRate)
|
||||
t.Errorf("expected 10 in limit by limitrate but %v was returned", rateLimit.LimitRate)
|
||||
}
|
||||
|
||||
data = map[string]string{}
|
||||
|
|
@ -177,27 +177,27 @@ func TestRateLimiting(t *testing.T) {
|
|||
t.Errorf("expected a RateLimit type")
|
||||
}
|
||||
if rateLimit.Connections.Limit != 5 {
|
||||
t.Errorf("expected 5 in limit by ip but %v was returend", rateLimit.Connections)
|
||||
t.Errorf("expected 5 in limit by ip but %v was returned", rateLimit.Connections)
|
||||
}
|
||||
if rateLimit.Connections.Burst != 5*3 {
|
||||
t.Errorf("expected %d in burst limit by ip but %v was returend", 5*3, rateLimit.Connections)
|
||||
t.Errorf("expected %d in burst limit by ip but %v was returned", 5*3, rateLimit.Connections)
|
||||
}
|
||||
if rateLimit.RPS.Limit != 100 {
|
||||
t.Errorf("expected 100 in limit by rps but %v was returend", rateLimit.RPS)
|
||||
t.Errorf("expected 100 in limit by rps but %v was returned", rateLimit.RPS)
|
||||
}
|
||||
if rateLimit.RPS.Burst != 100*3 {
|
||||
t.Errorf("expected %d in burst limit by rps but %v was returend", 100*3, rateLimit.RPS)
|
||||
t.Errorf("expected %d in burst limit by rps but %v was returned", 100*3, rateLimit.RPS)
|
||||
}
|
||||
if rateLimit.RPM.Limit != 10 {
|
||||
t.Errorf("expected 10 in limit by rpm but %v was returend", rateLimit.RPM)
|
||||
t.Errorf("expected 10 in limit by rpm but %v was returned", rateLimit.RPM)
|
||||
}
|
||||
if rateLimit.RPM.Burst != 10*3 {
|
||||
t.Errorf("expected %d in burst limit by rpm but %v was returend", 10*3, rateLimit.RPM)
|
||||
t.Errorf("expected %d in burst limit by rpm but %v was returned", 10*3, rateLimit.RPM)
|
||||
}
|
||||
if rateLimit.LimitRateAfter != 100 {
|
||||
t.Errorf("expected 100 in limit by limitrateafter but %v was returend", rateLimit.LimitRateAfter)
|
||||
t.Errorf("expected 100 in limit by limitrateafter but %v was returned", rateLimit.LimitRateAfter)
|
||||
}
|
||||
if rateLimit.LimitRate != 10 {
|
||||
t.Errorf("expected 10 in limit by limitrate but %v was returend", rateLimit.LimitRate)
|
||||
t.Errorf("expected 10 in limit by limitrate but %v was returned", rateLimit.LimitRate)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ func NewParser(r resolver.Resolver) parser.IngressAnnotation {
|
|||
// rule used to indicate if the upstream servers should use SSL
|
||||
func (a su) Parse(ing *networking.Ingress) (secure interface{}, err error) {
|
||||
if ca, _ := parser.GetStringAnnotation("secure-verify-ca-secret", ing); ca != "" {
|
||||
klog.Warningf("NOTE! secure-verify-ca-secret is not suppored anymore. Please use proxy-ssl-secret instead")
|
||||
klog.Warningf("NOTE! secure-verify-ca-secret is not supported anymore. Please use proxy-ssl-secret instead")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ func (a affinity) Parse(ing *networking.Ingress) (interface{}, error) {
|
|||
at = ""
|
||||
}
|
||||
|
||||
// Check the afinity mode that will be used
|
||||
// Check the affinity mode that will be used
|
||||
am, err := parser.GetStringAnnotation(annotationAffinityMode, ing)
|
||||
if err != nil {
|
||||
am = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue