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

Merge property file reading logic #769

Merged
merged 3 commits into from
Dec 11, 2023
Merged

Conversation

Or-Geva
Copy link
Contributor

@Or-Geva Or-Geva commented Dec 4, 2023

  • All tests passed. If this feature is not already covered by the tests, I added new tests.

@Or-Geva Or-Geva requested a review from yahavi December 4, 2023 08:25
@Or-Geva Or-Geva added ignore for release Automatically generated release notes safe to test Approve running integration tests on a pull request labels Dec 4, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Dec 4, 2023
@Or-Geva Or-Geva added the safe to test Approve running integration tests on a pull request label Dec 4, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Dec 4, 2023
Copy link
Member

@yahavi yahavi left a comment

Choose a reason for hiding this comment

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

I'd like to review again the tests after fixing them

@@ -115,33 +111,34 @@ public void getBuildInfoPropertiesFromEncryptedFile() throws IOException, Invali
}

public void failToReadEncryptedFileWithNoKey() throws IOException, InvalidAlgorithmParameterException, NoSuchPaddingException, IllegalBlockSizeException, NoSuchAlgorithmException, BadPaddingException, InvalidKeyException {
setupEncryptedFileTest();
// Create encrypted file with properties
createProperty();
Copy link
Member

Choose a reason for hiding this comment

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

This line does nothing. Shouldn't be this?

        try (FileOutputStream fileOutputStream = new FileOutputStream(tempFile.toFile())) {
            createProperty().store(fileOutputStream, "");
        }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, it should be setupEncryptedFileTest(createProperty()); and we are removing the keys on line 117

return props;
}

private Properties createPropertyEnv() {
Copy link
Member

Choose a reason for hiding this comment

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

This function does not create environment variables.
It also does the same as createProperty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It generates slightly different properties apart from using createProperty to specifically handle properties associated with environment reads, distinguishing them from file-related properties.

@Or-Geva Or-Geva added the safe to test Approve running integration tests on a pull request label Dec 11, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Dec 11, 2023
Copy link
Member

@yahavi yahavi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

👍 Frogbot scanned this pull request and found that it did not add vulnerable dependencies.


@Or-Geva Or-Geva merged commit 561d206 into jfrog:master Dec 11, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore for release Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants