Skip to content

Commit da9a2df

Browse files
committed
Add comment why name cannot be used when checking error messgaes
1 parent 18f1025 commit da9a2df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/e2e/invalid_resource.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ func generateClusterName() string {
212212

213213
// errorExistsInLog looks for a specific error message in the CAPC controller log files. Because the logs may contain
214214
// entries from previous test runs, or from previous tests in the same run, the function also requires that the log
215-
// line contains the namespace and cluster names.
215+
// line contains the namespace. The cluster name is not check because some controllers such as failure domain controller
216+
// prints a different name which is not the cluster name. In the e2e testing, the namespace only is unique enough because
217+
// it is generated randomly per test case.
216218
func errorExistsInLog(logFolder string, expectedError string) (bool, error) {
217219
expectedErrorFound := errors.New("expected error found")
218220
controllerLogPath := filepath.Join(logFolder, "controllers", "capc-controller-manager")

0 commit comments

Comments
 (0)