Skip to content

Split Bats tests into v2 and v3 suites - #211

Merged
jmurty merged 2 commits into
elasticdog:transcrypt-v3from
Erotemic:dev/split-tests
Jun 4, 2026
Merged

Split Bats tests into v2 and v3 suites#211
jmurty merged 2 commits into
elasticdog:transcrypt-v3from
Erotemic:dev/split-tests

Conversation

@Erotemic

Copy link
Copy Markdown

This PR addresses the duplication of tests into a v2 and v3 directory as asked for in #134 (comment) i.e.

  1. Duplicate the existing bats test suite into two copies to target the v2 (legacy) & v3 (new) encryption methods. The v3 tests will diverge from the v2 ones over the series of PRs as we implement the features, ideally without dropping any of the coverage they provide

The diff moves existing tests into a v2 folder, and modifies paths which should be reviewable via the diff.

The copied v3 paths can be verified that they are identical via:

sha256sum tests/v2/test_cleanup.bats tests/v3/test_cleanup.bats
sha256sum tests/v2/test_contexts.bats tests/v3/test_contexts.bats
sha256sum tests/v2/test_crypt.bats tests/v3/test_crypt.bats
sha256sum tests/v2/test_init.bats tests/v3/test_init.bats
sha256sum tests/v2/test_merge.bats tests/v3/test_merge.bats
sha256sum tests/v2/test_not_inited.bats tests/v3/test_not_inited.bats
sha256sum tests/v2/test_pre_commit.bats tests/v3/test_pre_commit.bats
sha256sum tests/v2/test_public_settings.bats tests/v3/test_public_settings.bats

Which produces:

dc53454064c880a6caadd6f7ab778f73f691b9dd50300e1863fb950254df6dad  tests/v2/test_cleanup.bats
dc53454064c880a6caadd6f7ab778f73f691b9dd50300e1863fb950254df6dad  tests/v3/test_cleanup.bats

60b5859b550b38b79cc3fd571a500b15b66b43fff09b654ab6cd85a5f44ce972  tests/v2/test_contexts.bats
60b5859b550b38b79cc3fd571a500b15b66b43fff09b654ab6cd85a5f44ce972  tests/v3/test_contexts.bats

bf37920d1389fc53b5e793e40ea918f601303e4807456152b514a66bb59c8860  tests/v2/test_crypt.bats
bf37920d1389fc53b5e793e40ea918f601303e4807456152b514a66bb59c8860  tests/v3/test_crypt.bats

3989beb25705314237e323ed17921393a8fe6c1d559bf9f458df53a8d81f659f  tests/v2/test_init.bats
3989beb25705314237e323ed17921393a8fe6c1d559bf9f458df53a8d81f659f  tests/v3/test_init.bats

5d0e19c9396cbf075bae4543d306fa20e37cbc8fda51a3f85ded79aed22aa7c7  tests/v2/test_merge.bats
5d0e19c9396cbf075bae4543d306fa20e37cbc8fda51a3f85ded79aed22aa7c7  tests/v3/test_merge.bats

61f37bb672e8c1ac1dd20774e00812c917013fc69f651b90a32298f9efed52be  tests/v2/test_not_inited.bats
61f37bb672e8c1ac1dd20774e00812c917013fc69f651b90a32298f9efed52be  tests/v3/test_not_inited.bats

bbae64cad7d5c8585200072b1111a37885925544fd82bffb5c1c795e6aa66e99  tests/v2/test_pre_commit.bats
bbae64cad7d5c8585200072b1111a37885925544fd82bffb5c1c795e6aa66e99  tests/v3/test_pre_commit.bats

83316a783b38f3690d61f670448c5ce9f2753fbcb4b383eee0378aa90fdbbcfb  tests/v2/test_public_settings.bats
83316a783b38f3690d61f670448c5ce9f2753fbcb4b383eee0378aa90fdbbcfb  tests/v3/test_public_settings.bats

@jmurty
jmurty merged commit cb43730 into elasticdog:transcrypt-v3 Jun 4, 2026
7 checks passed
@jmurty

jmurty commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

I've fixed the bats commands to run tests in GitHub actions and the README, and will merge to the transcrypt-v3 branch.

An easier way to check for differences between tests in tests/v2/ compared to the copies in tests/v3/ – which are currently identical – is to run:

diff -r tests/v2 tests/v3

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.

2 participants