(clusterName string, t *testing.T)
| 534 | } |
| 535 | |
| 536 | func (c configValidationTest) testCluster(clusterName string, t *testing.T) { |
| 537 | errs := validateClusterInfo(clusterName, *c.config.Clusters[clusterName]) |
| 538 | |
| 539 | if len(c.expectedErrorSubstring) != 0 { |
| 540 | if len(errs) == 0 { |
| 541 | t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) |
| 542 | } |
| 543 | for _, curr := range c.expectedErrorSubstring { |
| 544 | if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { |
| 545 | t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | } else { |
| 550 | if len(errs) != 0 { |
| 551 | t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) |
| 552 | } |
| 553 | } |
| 554 | } |
| 555 | |
| 556 | func (c configValidationTest) testAuthInfo(authInfoName string, t *testing.T) { |
| 557 | errs := validateAuthInfo(authInfoName, *c.config.AuthInfos[authInfoName]) |
no test coverage detected