Skip to content

Commit

Permalink
Allow cipher tests to be disabled when not building with SQLiteMC
Browse files Browse the repository at this point in the history
  • Loading branch information
Willena committed Oct 1, 2023
1 parent b2efd2f commit 610ad94
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ jobs:
run: |
make native SQLITE_OBJ=${{ env.SQLITE_DIR }}/lib/libsqlite3.dylib SQLITE_HEADER=${{ env.SQLITE_DIR }}/include/sqlite3.h
- name: Test
run: mvn --batch-mode --no-transfer-progress test
run: mvn --batch-mode --no-transfer-progress test -DdisableCipherTests=true

# release:
# name: Deploy
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/org/sqlite/mc/SQLiteMCChacha20ConfigTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@

import java.math.BigInteger;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.sqlite.SQLiteConfig;

@DisabledIfSystemProperty(
disabledReason = "SQLite3 binary not compatible with that test",
named = "disableCipherTests",
matches = "true")
class SQLiteMCChacha20ConfigTest {

private static final String unsaltedHexKeyValid =
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/org/sqlite/mc/SQLiteMCPragmaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@
import java.io.IOException;
import java.sql.*;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.sqlite.SQLiteConfig;
import org.sqlite.SQLiteException;

@DisabledIfSystemProperty(
disabledReason = "SQLite3 binary not compatible with that test",
named = "disableCipherTests",
matches = "true")
public class SQLiteMCPragmaTest {

private static final String SQL_TABLE =
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/org/sqlite/mc/SQLiteMCSQLInterfaceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
import java.io.IOException;
import java.sql.*;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.sqlite.SQLiteException;

@DisabledIfSystemProperty(
disabledReason = "SQLite3 binary not compatible with that test",
named = "disableCipherTests",
matches = "true")
public class SQLiteMCSQLInterfaceTest {

private static final String SQL_TABLE =
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/org/sqlite/mc/SQLiteMCSqlCipherConfigTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
import java.sql.SQLException;
import java.util.Properties;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.sqlite.SQLiteConfig;

@DisabledIfSystemProperty(
disabledReason = "SQLite3 binary not compatible with that test",
named = "disableCipherTests",
matches = "true")
class SQLiteMCSqlCipherConfigTest {

private static final String unsaltedHexKeyValid =
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/org/sqlite/mc/SQLiteMCURIInterfaceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
import java.net.URLEncoder;
import java.sql.*;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.sqlite.SQLiteException;

@DisabledIfSystemProperty(
disabledReason = "SQLite3 binary not compatible with that test",
named = "disableCipherTests",
matches = "true")
public class SQLiteMCURIInterfaceTest {

private static final String SQL_TABLE =
Expand Down

0 comments on commit 610ad94

Please sign in to comment.