Skip to content

Commit fa4e959

Browse files
committed
Fix unit test to run in CI
1 parent e39a4b2 commit fa4e959

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
env:
2323
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
2424
- name: Build with Maven
25-
run: mvn -B -Dgpg.passphrase=${GPG_PASSPHRASE} install --file pom.xml
25+
run: mvn -B -Dgpg.passphrase=${GPG_PASSPHRASE} -Dtest=org.purejava.KeepassProxyAccessTest install --file pom.xml
2626
env:
2727
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
2828

src/main/java/org/keepassxc/LinuxMacConnection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ protected JSONObject getCleartextResponse() throws IOException {
7676
private String getSocketPath() {
7777
if (SystemUtils.IS_OS_LINUX) {
7878
String path = System.getenv("XDG_RUNTIME_DIR");
79-
return (path == null) ? System.getenv("TMPDIR") : System.getenv("XDG_RUNTIME_DIR");
79+
if (null == path) path = System.getenv("TMPDIR");
80+
return (null == path) ? "/tmp" : path;
8081
}
8182
if (SystemUtils.IS_OS_MAC_OSX) {
8283
return System.getenv("TMPDIR");

src/test/java/org/purejava/KeepassProxyAccessTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void shouldThrowException() {
2424
kpa.associate();
2525
});
2626

27-
String expectedMessage = "Connection refused";
27+
String expectedMessage = "No such file or directory";
2828
String actualMessage = exception.getMessage();
2929

3030
assertTrue(actualMessage.contains(expectedMessage));

0 commit comments

Comments
 (0)