diff options
author | neoninteger | 2019-11-14 18:00:11 +1030 |
---|---|---|
committer | neoninteger | 2019-11-14 18:00:11 +1030 |
commit | d05747b3ec3599b0771554de20449c29521a8e11 (patch) | |
tree | 9c790c1a526920616f3f6d6e77cc360d4acf789d | |
parent | 4ada7aa2c0062f1688ed5c4f020209b6c66f76a9 (diff) | |
download | aur-d05747b3ec3599b0771554de20449c29521a8e11.tar.gz |
Fix remaining integration tests
The tests that were hanging all had a feature in common - they were
trying to synchronise a file from the server, and this is what the
tests were getting stuck on. For some reason, files will not sync when
the server is accessed from localhost (127.0.0.1) - this was also
noticed when I tried connecting the official Turtl client to the test
server - the file attachment wouldn't sync. What makes this even
stranger is that, although file syncing doesn't work from 127.0.0.1,
it works just fine when the server is accessed via 127.0.1.1 instead.
I'm not sure if this is an upstream bug or if it's a problem with my
personal setup, but for now, I've worked around the issue by manually
specifying 127.0.1.1 as the API/hosting endpoint in both of the test
configuration files.
Now all of the integration tests (except migrate, of course) pass!
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | config-client.yaml | 2 | ||||
-rw-r--r-- | config-server.yaml | 4 |
3 files changed, 10 insertions, 15 deletions
@@ -20,8 +20,8 @@ source=("https://github.com/turtl/core-rs/archive/${_commithash}.tar.gz" "config-server.yaml" "rusqlite.patch") sha256sums=("71c1caf3aeb6245040abb0ee063b574dd6ece6314c60edabbe4299a11df49b68" - "f5400e9c80c935915212e818f05eab8d3d542a54ed89e153c20a6c0fa00d8e1a" - "1b46d55e5f4753a494ceb005783db1c0c0908195b4f18a38a99118ecffae110a" + "31791752feae4d5b0a19272bbb15df827bf67bb9df237e45431dc4b15b212c2e" + "07cdaff828f3743b78693b029c8023d703874c4a612c64b3f9cf0608065b397b" "cd784b2b1de7bb0dba4d92623a525fc970627fd60b44b41d6f2d8e520770fce4") prepare() { @@ -108,23 +108,18 @@ check() { } # Run the cargo test suite for core-rs. - # Note: some of the integration tests fail to correctly authenticate with - # the server, which results in them infinitely trying to synchronise the - # database with the server and failing. For now, I have disabled these - # tests to enable the remaining tests to pass, but I really need to figure - # out what is causing the authentication failure. - # Also, the 'migrate' test requires a deprecated Lisp-based Turtl server to + # Note: The 'migrate' test requires a deprecated Lisp-based Turtl server to # be running, in order to test how the client can migrate data from an old - # server to a new NodeJS-based server. This package only includes the - # NodeJS server, which would cause this test to fail as the Lisp server is - # not available. As such, this test has also been disabled. + # server to a new NodeJS-based server. As the Lisp server is not run from + # this PKGBUILD check() function, the test will fail. To work around this, + # (at least for now) we just skip the test. run_tests() { log "Building and running unit tests..." cargo test --features sqlite-static --release -- --test-threads 1 log "Building and running integration tests..." cd integration-tests - cargo test --release -- --test-threads 1 --skip migrate --skip file_sync --skip import_export --skip login_sync_logout + cargo test --release -- --skip migrate cd .. } diff --git a/config-client.yaml b/config-client.yaml index 7344591fd8c6..05615eee1f38 100644 --- a/config-client.yaml +++ b/config-client.yaml @@ -33,7 +33,7 @@ logging: size: 1048576 api: - endpoint: "http://localhost:8181" + endpoint: "http://127.0.1.1:8181" # this should be set by the client loading the core. standard format is # <platform>/<version>, like "android/0.7.0" client_version_string: 'core' diff --git a/config-server.yaml b/config-server.yaml index b71732683262..846182577642 100644 --- a/config-server.yaml +++ b/config-server.yaml @@ -2,7 +2,7 @@ server: # Per default, turtl will listen on all IP addresses # You can choose the IP it will use with this parameter - host: '127.0.0.1' + host: '127.0.1.1' port: 8181 db: @@ -16,7 +16,7 @@ app: # Set to 'I UNDERSTAND THIS VIOLATES THE PRIVACY OF MY USERS' to enable enable_bookmarker_proxy: false # no trailing slash - api_url: 'http://127.0.0.1:8181' + api_url: 'http://127.0.1.1:8181' www_url: 'https://turtlapp.com' emails: admin: 'admin@turtlapp.com' |