forked from CartoDB/cartodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TESTING
44 lines (30 loc) · 1.08 KB
/
TESTING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Testing CartoDB
===============
Easy way
--------
Just run "make check".
Detailed way
------------
CartoDB tests are based on [Ruby Spec](http://rspec.info/).
The procedure to run them is as follows:
# Prepare test database
bundle exec rake cartodb:test:prepare
# Run all specs
bundle exec rspec
If you want to run specific tests, rather than all of them, you
can specify them on the `rspec` command line, like:
bundle exec spec/lib/sql_test_spec.rb
Troubleshooting
---------------
Common system configuration issues are reported in this section.
- "No such user: test_cartodb_user_###"
Make sure test.port in config/database.yml is not pointing to
pg_bouncer, as dynamically created database roles aren't easily
supported by it (you'd need to explicitly list allowed usernames,
and over 70 new users are created during a full testsuite run).
Speeding up test runs
---------------------
CartoDB is a large app.
We recommend you use the [spin gem](https://github.com/jstorimer/spin/)
to load the main application into memory while you are testing.
TODO: document how