integration

command
v0.0.0-...-4b98c26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

README

Tools for integration tests

Install

apt install ruby ruby-dev
gem install bundler
cd cozy-stack
go install
cd tests/integration
bundle install
npm install -g @bitwarden/cli@1.16.0

Optional: install MailHog

Automated tests

To launch an automated scenario of tests:

bundle exec ruby tests/push_folder.rb -v

The tests clean the logs and databases from the previous runs when they start, but does no cleaning on exit. You can inspect them to find what can have gone wrong for example. If you just want to clean those because you have finish your testing sessions, you can run this command:

bundle exec ruby clean.rb

You can also run the tests in parallel with:

go run parallel-runner.go -n 3 -fail-fast

Interactive mode

It's possible to do manual tests and to use the tools in an interactive mode to setup the sharing, create and update documents, etc.

bundle exec ./console.rb

Example of session:

b = Bootstrap.push_folder
ap b.sharing
b.open
b.accept
b.recipients.first.open

Compare trees

It can be useful for debugging to compare tree with a visual representation. You can generate an image with this ruby code:

Debug.visualize_tree [inst, inst_recipient], sharing

Swift

It's complicated to launch the tests with Swift, but it's possible to simulate it with swifttest:

$ go run ./tests/swift
$ cd tests/integration
$ export COZY_SWIFTTEST=1
$ bundle exec ruby tests/sharing_push_folder.rb

Logs

The log files for the stack are kept inside the tmp/ directory. You can use lnav tool to view them. The log format of cozy-stack can installed with:

lnav -i cozy-stack/scripts/lnav_cozy_log.json

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL