Migrate Ruby specs to Golang
Overview
spec
directory contains Ruby specs. The specs set up a mock server and execute a binary to check that the behavior is correct.
History
Initially, Gitlab Shell was a Ruby project that migrated to Golang. Since the integration tests call a compiled binary, they were suitable to check the new binaries compiled from Golang. When gitlab-sshd
was introduced, acceptance tests were introduced as well. They check the behavior through an SSH server rather than binaries. The Ruby specs are still useful to test binaries to verify that OpenSSH + Gitlab Shell solution works correctly.
Proposal
Ruby is used only for development and excluded from distribution packages. However, migrating Ruby specs to Golang would:
- Narrow the technology stack of Gitlab Shell
- Reduce development burden and eliminate the need to upgrade Ruby version and gems
Notes
The code for gitlab-sshd acceptance tests can be reused. Currently, it sets up the mock server and runs gitlab-sshd server, gitlab-shell
package can have similar code that sets up the mock server and executes the binaries.