-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from wherobots/use-new-runtime-ids
chore: use new runtime ids, add user agent header
- Loading branch information
Showing
4 changed files
with
49 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
lib/src/test/java/com/wherobots/db/jdbc/WherobotsJdbcDriverTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.wherobots.db.jdbc; | ||
|
||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import java.util.Map; | ||
|
||
class WherobotsJdbcDriverTest { | ||
|
||
@Test | ||
void getUserAgentHeader() { | ||
System.setProperty("java.version", "1"); | ||
System.setProperty("os.name", "os1"); | ||
WherobotsJdbcDriver driver = new WherobotsJdbcDriver(); | ||
Map<String, String> header = driver.getUserAgentHeader(); | ||
assert header.containsKey("User-Agent"); | ||
String user_agent = header.get("User-Agent"); | ||
assert user_agent.equals("wherobots-jdbc-driver/unknown os/os1 java/1"); | ||
} | ||
} |