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

Add Unit Tests #26

Merged
merged 6 commits into from
Jul 16, 2024
Merged

Add Unit Tests #26

merged 6 commits into from
Jul 16, 2024

Conversation

mwodahl
Copy link

@mwodahl mwodahl commented Jul 3, 2024

This PR adds unit tests for the S3-depositor methods.

Additionally, there is some refactoring within the depositor to allow its methods to be tested.

These changes were tested with Maven and verified to run correctly.

}

@Test
void testGetEnvironmentVariableEmpty() {

Choose a reason for hiding this comment

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

Are we testing anything different than the testGetEnvironmentVariableNotSet method above?

Copy link
Author

Choose a reason for hiding this comment

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

This tests when the environment variable is set to the empty string instead of when it's not set at all as that's the other case when the default variable is used. I've consolidated these two cases into one test.

Copy link
Member

@dmccoystephenson dmccoystephenson left a comment

Choose a reason for hiding this comment

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

This looks good & the unit tests pass!

image

I just had the one comment

pom.xml Outdated
@@ -10,6 +10,8 @@
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<jmockit.version>1.49</jmockit.version>
<powermock.version>2.0.2</powermock.version>
Copy link
Member

@dmccoystephenson dmccoystephenson Jul 10, 2024

Choose a reason for hiding this comment

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

Is this powermock dependency used anywhere?

Copy link
Author

Choose a reason for hiding this comment

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

It is not - this has been removed

Copy link

@drewjj drewjj left a comment

Choose a reason for hiding this comment

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

Tests pass but they don't work great in VSCode. I am going to approve this with the comment that this might be something to look into.

@mwodahl
Copy link
Author

mwodahl commented Jul 16, 2024

Tests pass but they don't work great in VSCode. I am going to approve this with the comment that this might be something to look into.

These issues with running tests in VSCode should be fixed now.

@mwodahl mwodahl requested a review from payneBrandon July 16, 2024 19:46
Copy link

@drewjj drewjj left a comment

Choose a reason for hiding this comment

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

Awesome, they do indeed work in VSCode now!

@drewjj drewjj merged commit 05cc92d into dev Jul 16, 2024
2 checks passed
@drewjj drewjj deleted the Feature/Add-Unit-Tests branch July 16, 2024 21:33
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.

4 participants