(authInfoName string, t *testing.T)
| 554 | } |
| 555 | |
| 556 | func (c configValidationTest) testAuthInfo(authInfoName string, t *testing.T) { |
| 557 | errs := validateAuthInfo(authInfoName, *c.config.AuthInfos[authInfoName]) |
| 558 | |
| 559 | if len(c.expectedErrorSubstring) != 0 { |
| 560 | if len(errs) == 0 { |
| 561 | t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) |
| 562 | } |
| 563 | for _, curr := range c.expectedErrorSubstring { |
| 564 | if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { |
| 565 | t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | } else { |
| 570 | if len(errs) != 0 { |
| 571 | t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) |
| 572 | } |
| 573 | } |
| 574 | } |
no test coverage detected