Remove preview for encrypted RSpec test examples#177
Merged
Conversation
…e it from the rake task. Related: https://github.com/KnapsackPro/knapsack_pro-ruby/pull/176/files Related old commit: 96ec95d
01b7b58 to
7f7aed2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.hexdigestmethod 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.hexdigestbut 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.