Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show sha256 for Xray's DBSyncV3 files to be downloaded #1070

Merged
merged 2 commits into from
Dec 17, 2023

Conversation

eranbrodet
Copy link
Contributor

No description provided.

Copy link
Contributor

github-actions bot commented Dec 11, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@eranbrodet
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@eyalbe4 eyalbe4 self-requested a review December 12, 2023 08:41
@eyalbe4 eyalbe4 changed the title Show sha256 for Xray's DBSyncV3 files that will be downloaded Show sha256 for Xray's DBSyncV3 files to be downloaded Dec 13, 2023
Copy link
Contributor

@eyalbe4 eyalbe4 left a comment

Choose a reason for hiding this comment

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

  • We're adding tests to ensure the code works as expected, regardless of whether the functionality has an external affect or not.
  • Testing this porperly is super easy. No extra logic what so ever. Simply have a function that returns the log output as a string, and then test its output. The tests table should include all cases.

@eyalbe4 eyalbe4 self-requested a review December 17, 2023 07:37
@eranbrodet
Copy link
Contributor Author

  • We're adding tests to ensure the code works as expected, regardless of whether the functionality has an external affect or not.

    • Testing this porperly is super easy. No extra logic what so ever. Simply have a function that returns the log output as a string, and then test its output. The tests table should include all cases.

I've extracted getting the filename string to a different function and changed the test to check that returned string.
Works for you?
I think adding a function that is "get string for specific log" is a bad code-smell, at least parsing the filename is reasonably something that justify being its own function and we can put in the test you desire.

@eyalbe4 eyalbe4 merged commit 9fe94df into jfrog:dev Dec 17, 2023
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants