Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
|Namespace Name| default|
| Comment| default database|
| Location|*|
| Owner| *|
| Owner| spark|
+--------------+----------------------------------------+
10 changes: 9 additions & 1 deletion Tests/SparkConnectTests/SQLTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct SQLTests {
let regexOwner = /(runner|185)/

private func cleanUp(_ str: String) -> String {
return removeOwner(removeID(removeLocation(str)))
return removeOwner(removeID(removeLocation(replaceUserName(str))))
}

private func removeID(_ str: String) -> String {
Expand All @@ -51,6 +51,14 @@ struct SQLTests {
return str.replacing(regexOwner, with: "*")
}

private func replaceUserName(_ str: String) -> String {
#if os(macOS) || os(Linux)
return str.replacing(ProcessInfo.processInfo.userName, with: "spark")
#else
return str
#endif
}

private func normalize(_ str: String) -> String {
return str.replacing(/[-]+/, with: "-").replacing(/[ ]+/, with: " ")
}
Expand Down
Loading