Contains unit tests for the objectbox package to avoid a cyclic dependency on
objectbox_generator.
To run set up the package:
dart pub get
dart run build_runner buildAnd run the tests:
dart testOr for better log output (e.g. to attribute native logs to a test):
# Run only one test suite (== test file) at a time.
# Print log for every completed test.
dart test --concurrency=1 --reporter expandedTo run tests using an in-memory database:
export OBX_IN_MEMORY=true
dart testTo run tests using a Sync server locally (note that GitLab CI uses a different token option):
# Set server URL and GitLab private token
export CI_SERVER_URL=REPLACE_ME
export PRIVATE_TOKEN=REPLACE_ME
# Download the server binary and make it discoverable by sync_test.dart
mkdir sync-server && cd sync-server
../../tool/download-server.sh --gitlab-base-url $CI_SERVER_URL --branch sync --private-token $PRIVATE_TOKEN
export PATH="$PATH:$PWD"
cd ..
dart test test/sync_test.dart