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

50 Adding integration tests #167

Merged
merged 32 commits into from
Feb 6, 2024
Merged

50 Adding integration tests #167

merged 32 commits into from
Feb 6, 2024

Conversation

kappsegla
Copy link
Contributor

This will add integration tests that can be used to check that the built docker image can be started and the server called.

The following updates are included:
Changes to the Dockerfile, dependencies are now downloaded here and not by maven.
Github action release.yml now runs mvn verify to verify the application before publishing anything.
Disables generation of a jar file during maven build process because it's not needed. Classes will be copied directly into docker image anyway.

Integration tests that starts the server on a random free port.
Tests for the following commands:
PING - PONG
SETNX
SET - GET
DELETE
EXISTS

Error for not implemented command
Change initialization of ServerSocket setReuseAddress true to happen
before binding. Otherwise, the reuse address option doesn't work.
…-lists' into 50-integration-tests

# Conflicts:
#	src/main/java/org/fungover/haze/Main.java
#	src/test/java/org/fungover/haze/MainTest.java
When running tests testcontainers uses
slf4j to do logging. Without an implementation an error message
will be printed.
…commands-dont-work-with-lists' into 50-integration-tests

# Conflicts:
#	src/test/java/org/fungover/haze/MainTest.java
Before building new docker images during release integration tests will
be run. The command is now mvn -B verify.
@kappsegla kappsegla added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Mar 4, 2023
@kappsegla kappsegla linked an issue Mar 4, 2023 that may be closed by this pull request
@sonarcloud
Copy link

sonarcloud bot commented Mar 4, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

20.0% 20.0% Coverage
0.0% 0.0% Duplication

Dockerfile Outdated Show resolved Hide resolved
robinalfengard
robinalfengard previously approved these changes Feb 2, 2024
Copy link
Contributor

@robinalfengard robinalfengard left a comment

Choose a reason for hiding this comment

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

Good update to erase unnecessary actions like the generation of jar file. The verify with maven is also a good addition. Seems to be some issue with sonar cloud coverage though.

Integration tests that starts the server on a random free port.
Tests for the following commands:
PING - PONG
SETNX
SET - GET
DELETE
EXISTS

Error for not implemented command
Change initialization of ServerSocket setReuseAddress true to happen
before binding. Otherwise, the reuse address option doesn't work.
When running tests testcontainers uses
slf4j to do logging. Without an implementation an error message
will be printed.
robinalfengard
robinalfengard previously approved these changes Feb 6, 2024
Copy link
Contributor

@robinalfengard robinalfengard left a comment

Choose a reason for hiding this comment

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

Looks great! Great to implement integration tests to cover complex methods in main class

@kappsegla kappsegla dismissed robinalfengard’s stale review February 6, 2024 08:26

The merge-base changed after approval.

cmatlak
cmatlak previously approved these changes Feb 6, 2024
Copy link
Contributor

@cmatlak cmatlak left a comment

Choose a reason for hiding this comment

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

Changes looks good with updated versions

@kappsegla kappsegla dismissed cmatlak’s stale review February 6, 2024 08:32

The merge-base changed after approval.

@cmatlak
Copy link
Contributor

cmatlak commented Feb 6, 2024

conflicts should be resolved by @kappsegla ?

Copy link

sonarcloud bot commented Feb 6, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@cmatlak cmatlak left a comment

Choose a reason for hiding this comment

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

this update should compile good, all test checks passed

Copy link
Contributor

@robinalfengard robinalfengard left a comment

Choose a reason for hiding this comment

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

Looks good!

@cmatlak cmatlak added this pull request to the merge queue Feb 6, 2024
Merged via the queue into main with commit 5333c5f Feb 6, 2024
3 checks passed
@cmatlak cmatlak deleted the 50-integration-tests branch February 6, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration tests
3 participants