diff --git a/Makefile b/Makefile index 1fe9389923c..e17d7e6e5dd 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,6 @@ ARTIFACT_DESTINATION_FILE ?= ./tmp/idp.tar.gz watch_events \ docker_setup \ download_acuant_sdk \ - fast_setup \ - fast_test \ help \ lint \ lint_analytics_events \ @@ -59,9 +57,6 @@ all: check setup $(CONFIG): config/application.yml.default ## Runs setup scripts (updates packages, dependencies, databases, etc) bin/setup -fast_setup: ## Abbreviated setup script that skips linking some files - bin/fast_setup - docker_setup: ## Setup script for Docker development bin/docker_setup @@ -190,10 +185,6 @@ test_serial: export RAILS_ENV := test test_serial: $(CONFIG) ## Runs RSpec and yarn tests serially bundle exec rake spec && yarn test -fast_test: export RAILS_ENV := test -fast_test: ## Abbreviated test run, runs RSpec tests without accessibility specs - bundle exec rspec --exclude-pattern "**/features/accessibility/*_spec.rb" - tmp/$(HOST)-$(PORT).key tmp/$(HOST)-$(PORT).crt: ## Self-signed cert for local HTTPS development mkdir -p tmp openssl req \ diff --git a/bin/fast_setup b/bin/fast_setup deleted file mode 100755 index b7883937edb..00000000000 --- a/bin/fast_setup +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env ruby -require 'pathname' - -# path to your application root. -APP_ROOT = Pathname.new File.expand_path("../../", __FILE__) - -def run(command) - abort "command failed (#{$?}): #{command}" unless system command -end - -Dir.chdir APP_ROOT do - # This script is a starting point to setup your application. - # Add necessary setup steps to this file: - - puts %q[ - _ _ - | | (_) - | | ___ __ _ _ _ __ __ _ _____ __ - | |/ _ \ / _` | | '_ \ / _` |/ _ \ \ / / - | | (_) | (_| | | | | || (_| | (_) \ V / - |_|\___/ \__, |_|_| |_(_)__, |\___/ \_/ - __/ | __/ | - |___/ |___/ - ] - - puts "== Copying application.yml ==" - run "test -L config/application.yml || cp -v config/application.yml.default config/application.yml" - - puts "== Linking service_providers.yml ==" - run "test -L config/service_providers.yml || ln -sv service_providers.localdev.yml config/service_providers.yml" - - puts "== Linking agencies.yml ==" - run "test -L config/agencies.yml || ln -sv agencies.localdev.yml config/agencies.yml" - - puts "== Linking sample certs and keys ==" - run "test -L certs || ln -sv certs.example certs" - run "test -L keys || ln -sv keys.example keys" - - puts "\n== Installing dependencies ==" - run "bundle check || bundle install --without deploy production" - - puts "\n== Removing old logs and tempfiles ==" - run "rm -f log/*" - run "rm -rf tmp/cache" - - puts "\n== Restarting application server ==" - run "mkdir -p tmp" - run "touch tmp/restart.txt" -end diff --git a/docs/local-development.md b/docs/local-development.md index dd45752c211..f2c53d6aacc 100644 --- a/docs/local-development.md +++ b/docs/local-development.md @@ -77,30 +77,31 @@ different options of the authentication request, such as AAL or IAL. ### Running tests locally - Login.gov uses the following tools for our testing: +Login.gov uses the following tools for our testing: - - [RSpec](https://relishapp.com/rspec/rspec-core/docs/command-line) - - [Mocha documentation](https://mochajs.org/) +- [RSpec](https://relishapp.com/rspec/rspec-core/docs/command-line) +- [Mocha documentation](https://mochajs.org/) - To run our full test suite locally, use the following command: +To run our full test suite locally, use the following command: - ``` - $ make test - ``` +``` +$ make test +``` - Use the following command to run a subset of our test suite, excluding slower tests: +Running the full test suite takes a very long time, so usually you'll want to run the individual +test files or folders you're interested in: - ``` - $ make fast_test - ``` +``` +$ bundle exec rspec spec/i18n_spec.rb +``` - Check out our Makefile commands and learn more about how you can customize this command to run specific tests using rspec: https://github.com/18F/identity-idp/blob/main/Makefile#L41 +Check out our Makefile commands and learn more about how you can customize this command to run specific tests using rspec: https://github.com/18F/identity-idp/blob/main/Makefile#L41 - To test a specific spec file with rspec, you may need to add the following configuration to `/config/application.yml` so the tests do not crash: - ``` - test: - rack_timeout_service_timeout_seconds: 9_999_999_999 - ``` +To test a specific spec file with rspec, you may need to add the following configuration to `/config/application.yml` so the tests do not crash: +``` +test: + rack_timeout_service_timeout_seconds: 9_999_999_999 +``` #### Showing the Browser