Skip to content

Remove preview for encrypted RSpec test examples#177

Merged
ArturT merged 2 commits intomasterfrom
remove-encrypted-test-examples-preview
Sep 21, 2022
Merged

Remove preview for encrypted RSpec test examples#177
ArturT merged 2 commits intomasterfrom
remove-encrypted-test-examples-preview

Conversation

@ArturT
Copy link
Copy Markdown
Member

@ArturT ArturT commented Sep 20, 2022

RSpec split by test examples feature can't be used at the same time when encryption is enabled.

Let's remove a preview of test examples from the rake task (KNAPSACK_PRO_SALT=xxx bundle exec rake "knapsack_pro:encrypted_test_file_names[rspec]"). It's not needed.

Related

Related changes in the documentation: https://github.com/KnapsackPro/knapsack_pro-ruby/pull/176/files

Related old commit that we undo 96ec95d

Context

There are technical limitations that prevented us from using the RSpec split by test examples feature at the same time with encryption.
Currently, encryption works in one direction. Each test file name is generated with Digest::SHA2.hexdigest method and 64 chars salt.
We are unable to decrypt the test file paths until we know them (we need the file name to calculate the hash value). We know what test files are on your local/CI disk so we can calculate their value with Digest::SHA2.hexdigest
but we don't know what were the test examples that were executed in the previous CI build to calculate the hash value and thanks to that, decrypt values returned from the API.

Idea for future improvement

There is a possible solution to that problem. We would have to completely change the way how encryption is done and use an algorithm that allows decrypting only based on encrypted values and a key stored in the CI.
Thanks to that, the list of encrypted test cases fetched from Knapsack Pro API could be decrypted on the CI.

@ArturT ArturT force-pushed the remove-encrypted-test-examples-preview branch from 01b7b58 to 7f7aed2 Compare September 20, 2022 18:50
@ArturT ArturT requested a review from shadre September 20, 2022 18:51
Copy link
Copy Markdown
Member

@shadre shadre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ArturT ArturT merged commit 9bc504b into master Sep 21, 2022
@ArturT ArturT deleted the remove-encrypted-test-examples-preview branch September 21, 2022 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants