Run rspec tests locally, easily

We test our four production nameservers using `rspec`, and although that
worked fine when we used GitHub actions with a curated Ruby, it didn't
always work as well when running locally.

With this commit we introduce a Gemfile which has the necessary Ruby
dependencies, which make it easer to run the tests locally.
This commit is contained in:
Brian Cunnie
2025-07-26 14:00:59 -07:00
parent d987e155ea
commit 4cdccc6771
3 changed files with 71 additions and 1 deletions

6
Gemfile Normal file
View File

@@ -0,0 +1,6 @@
source 'https://rubygems.org'
ruby '3.4.2'
gem 'rspec'
gem 'rubocop'

63
Gemfile.lock Normal file
View File

@@ -0,0 +1,63 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.3)
diff-lcs (1.6.2)
json (2.13.1)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
parallel (1.27.0)
parser (3.3.8.0)
ast (~> 2.4.1)
racc
prism (1.4.0)
racc (1.8.1)
rainbow (3.1.1)
regexp_parser (2.10.0)
rspec (3.13.1)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.5)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.4)
rubocop (1.79.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.46.0, < 2.0)
ruby-progressbar (~> 1.7)
tsort (>= 0.2.0)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.46.0)
parser (>= 3.3.7.2)
prism (~> 1.4)
ruby-progressbar (1.13.0)
tsort (0.2.0)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
PLATFORMS
arm64-darwin-24
ruby
DEPENDENCIES
rspec
rubocop
RUBY VERSION
ruby 3.4.2p28
BUNDLED WITH
2.6.6

View File

@@ -157,7 +157,8 @@ as ARM64 (AWS Graviton, Apple M1/M2).
- `spec/` contains the tests for the production nameservers. To run - `spec/` contains the tests for the production nameservers. To run
the tests locally: the tests locally:
```bash ```bash
DOMAINS=nip.io,sslip.io rspec --format documentation --color spec bundle
DOMAINS=nip.io,sslip.io bundle exec rspec --format documentation --color spec
``` ```
- `k8s/document_root_sslip.io/` contains the HTML content of the sslip.io - `k8s/document_root_sslip.io/` contains the HTML content of the sslip.io
website. website.