Sync Storage server in Rust
Go to file
2019-10-18 14:39:30 -07:00
.circleci chore: fix cache key to include CIRCLE_TAG 2019-10-09 15:32:55 -07:00
codegen test: convert the db_tests to async/await 2019-06-27 12:40:40 -07:00
db-tests bug: accept weighted content-type headers 2019-10-17 15:45:06 -07:00
docs f add spanner integration 2019-09-27 12:02:58 -07:00
migrations fix: get the session timestamp from Spanner 2019-09-26 13:28:51 -07:00
scripts fix: use single = for equality test in docs script 2018-10-16 18:19:58 +01:00
src f unwrap you can't refuse 2019-10-17 19:21:03 -07:00
tools/spanner f read the spanner data from the spanner DSN 2019-10-18 14:39:30 -07:00
.clog.toml chore: tag 0.1.0 2019-10-04 16:32:16 -07:00
.gitignore Fix #169 Implement a version of syncstorage-rs with spanner as the backend, using google-apis-rs in a threadpool. 2019-07-25 10:24:55 -04:00
.travis.yml Feat/126 (#185) 2019-08-06 16:26:53 -07:00
Cargo.lock chore: tag 0.1.4 2019-10-18 00:03:03 -07:00
Cargo.toml chore: tag 0.1.4 2019-10-18 00:03:03 -07:00
CHANGELOG.md chore: tag 0.1.4 2019-10-18 00:03:03 -07:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-27 19:32:50 -07:00
CONTRIBUTING.md docs: more on installation/running individual tests 2019-05-16 10:28:39 -07:00
docker-compose.e2e.yaml Feat/126 (#185) 2019-08-06 16:26:53 -07:00
docker-compose.yaml test: run unit & e2e tests on circleci 2019-06-11 14:07:26 -07:00
Dockerfile fix: switch sentry to its curl transport 2019-10-17 15:48:31 -07:00
LICENSE chore: initial files 2018-07-20 15:28:46 -07:00
make_hawk_token.py more 2019-09-27 11:25:37 -07:00
PULL_REQUEST_TEMPLATE.md chore: update language in response to PR suggestions 2019-10-08 17:13:57 -04:00
README.md docs: add info on how to update Sentry locally 2019-10-14 14:14:11 -04:00
spanner-2019-10-01.ddl fix: switch sentry to its curl transport 2019-10-17 15:48:31 -07:00
version.json feat: Add docker config (#140) 2019-06-04 10:06:13 -07:00

License: MPL 2.0 Test Status Build Status

Syncstorage-rs

Mozilla Sync Storage node built with Rust.

API docs: https://mozilla-services.readthedocs.io/en/latest/storage/apis-1.5.html

Code docs: https://mozilla-services.github.io/syncstorage-rs/syncstorage/

Functional tests live in https://github.com/mozilla-services/server-syncstorage/ and can be run against a local server, e.g.:

Requirements

  • Rust stable
  • MySQL 5.7 (or compatible)
    • libmysqlclient (brew install mysql on macOS, apt-get install libmysqlclient-dev on Ubuntu)

Setting Up

  1. Install Rust and Install Go.

  2. Create a syncstorage user/database. In the mysql shell:

    CREATE USER "syncstorage"@"localhost" IDENTIFIED BY "password";
    CREATE DATABASE syncstorage;`
    
  3. Run:

     $ export SYNC_MASTER_SECRET=<SOMESECRET>
     $ export SYNC_DATABASE_URL=mysql://<YOUR_MYSQL_USERNAME>:<YOUR_MYSQL_PASSWORD>@localhost/syncstorage
     $ cargo run
    

Logging

If you want to connect to the existing Sentry project for local development, login to Sentry, and go to the page with api keys. Copy the DSN value, and export SENTRY_DSN=DSN_VALUE_GOES_HERE to the environment when running this project.

Running the Unit tests

  1. Run:

     $ export RUST_TEST_THREADS=1
     $ cargo test
    

Running the End-to-End tests

  1. If you haven't already followed the instructions here to get all the dependencies for the server-syncstorage repo, you should start there.

  2. Install (Python) server-syncstorage:

     $ git clone https://github.com/mozilla-services/server-syncstorage/
     $ cd server-syncstorage
     $ make build
    
  3. Run an instance of syncstorage-rs (see step 3 above).

  4. Run:

     $ ./local/bin/python syncstorage/tests/functional/test_storage.py http://localhost:8000#<SOMESECRET>
    

Individual tests can be specified via the SYNC_TEST_PREFIX env var:

    $ SYNC_TEST_PREFIX=test_get_collection \
        ./local/bin/python syncstorage/tests/functional/test_storage.py http://localhost:8000#<SOMESECRET>