Skip to content

Add isolated portal RSpec runner for Apple container - #1719

Open
dlq wants to merge 2 commits into
aces:masterfrom
dlq:apple-container-test-v8
Open

dlq wants to merge 2 commits into
aces:masterfrom
dlq:apple-container-test-v8

Conversation

@dlq

@dlq dlq commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Add deploy/apple-container/apple-container.sh test [RSpec arguments] to run the current checkout’s portal specs against disposable test infrastructure. Each invocation creates its own MariaDB container, application container, credentials, and network, prepares the database with CBRAIN’s existing CI tasks, returns RSpec’s exit status, and cleans up on exit.

The checkout is mounted read-only and synchronized into the test container, including local edits and deletions. Generated files stay in that container. Gems come from the built image. This adapts the dedicated test-service workflow from Hugues’s Docker development branch.

deploy/apple-container/apple-container.sh test spec/models/tool_spec.rb
CI=true deploy/apple-container/apple-container.sh test

Validation

Tested on Apple silicon with Ruby 4.0.2 / Rails 8.1.4.1.

  • The final command completed the full portal suite with 1,693 examples, 0 failures, 11 pending, with CI eager loading and seed 48268. The focused lazy-loading run passed 18 examples.
  • A temporary intentional failure returned exit code 1. A separate check verified the read-only checkout, container-local generated files, and removal of image-only source files. Concurrent invocations used separate resources.
  • All test containers and networks were removed afterwards. Checksums of the live UNIX and Slurm databases’ user, file, and task records matched before and after testing.
  • ShellCheck, Bash syntax, and Git whitespace checks passed.

Test-order follow-up in #1720. Seed 13752 exposed an undefined RSpec::Mocks::Matchers::ReceiveMessageChain in spec/models/data_provider_spec.rb:882. #1720 narrows the cache-revision filesystem mocks. With that fix applied, both full-suite seeds 13752 and 48268 passed with 1,693 examples, 0 failures, and 11 pending each, using CI eager loading on Ruby 4.0.2 / Rails 8.1.4.1. Both commands exited successfully.

Depends on #1717 and targets aces:master. Until #1717 merges, use the runner-only diff for the three-file change. A trial merge with #1718 was clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant