Fixes #3116.
This allows us to drop our custom patch for running system tests,
as well as opening up all the usual rails test goodies like running
individual files or directories.
curl -siL http://127.0.0.1:3000/api/0.6/node/1 | grep 'Null Island'
- name: Test Complete Suite
run: |
- docker-compose run --rm web bundle exec rails test:db
+ docker-compose run --rm web bundle exec rails db:test:prepare
+ docker-compose run --rm web bundle exec rails test:all
- name: Install node modules
run: bundle exec rake yarn:install
- name: Run tests
- run: bundle exec rake test:db
+ run: bundle exec rails test:all
- name: Report completion to Coveralls
uses: coverallsapp/github-action@v1.1.2
with:
You can run the existing test suite with:
```
-bundle exec rake test
+bundle exec rails test:all
```
You can view test coverage statistics by browsing the `coverage` directory.
Run the test suite by running:
- docker-compose run --rm web bundle exec rake test:db
+ docker-compose run --rm web bundle exec rails test:all
### Loading an OSM extract
To ensure that everything is set up properly, you should now run:
```
-bundle exec rake test:db
+bundle exec rails test:all
```
This test will take a few minutes, reporting tests run, assertions, and any errors. If you receive no errors, then your installation is successful.
```
cd /srv/openstreetmap-website/
-rake test
+bundle exec rails test:all
```
To access the web pages you run the following commands then access the site in your [local browser](http://localhost:3000):
```
vagrant ssh
cd /srv/openstreetmap-website/
-rails server --binding=0.0.0.0
+bundle exec rails server --binding=0.0.0.0
```
You edit the code on your computer using the code editor you are used to using, then through shared folders the code is updated on the VM instantly.
The only file in this directory that should be edited by hand is en.yml, when
localisation strings change or new translations are introduced. All other
languages _need_ to be edited using translatewiki.net. Please make sure that you
-run the tests using *rake test* to make sure that there are no errors, as there
-is at least one test that makes sure that all translations are valid (we'll
-makes sure that they won't cause the site to not work).
+run the tests using *bundle exec rails test:all* to make sure that there are no
+errors, as there is at least one test that makes sure that all translations are
+valid (we'll makes sure that they won't cause the site to not work).
There is more information about translating the website on the wiki at
http://wiki.openstreetmap.org/wiki/Website_Internationalization.
+++ /dev/null
-task :test => :environment do
- Rails::TestUnit::Runner.rake_run(["test/system"]) unless ENV.key?("TEST")
-end
-
-namespace :test do
- task "lib" => "test:prepare" do
- $LOAD_PATH << "test"
- Rails::TestUnit::Runner.rake_run(["test/lib"])
- end
-end