This commit is contained in:
duwenxin
2026-02-10 11:36:00 -05:00
parent e2cbb476b6
commit e748bd95f3

View File

@@ -517,8 +517,11 @@ func runDataplexSearchEntriesToolInvokeTest(t *testing.T, tableName string, data
t.Fatalf("expected entry to have key '%s', but it was not found in %v", tc.wantContentKey, entry)
}
} else {
if !strings.Contains(resultStr, `"error":`) {
t.Fatalf("expected an error message in the result, but got: %s", resultStr)
isResultEmpty := resultStr == "" || resultStr == "[]" || resultStr == "null"
hasError := strings.Contains(resultStr, `"error":`)
if !isResultEmpty && !hasError {
t.Fatalf("expected an empty result or error message, but got: %s", resultStr)
}
}
})