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 for Network & Storage. And minor improvements #11

Merged
merged 13 commits into from
Aug 1, 2024

Conversation

dharanad
Copy link
Collaborator

@dharanad dharanad commented Jul 30, 2024

Partially closes #3

Change List

  • Added unit tests for Network Layer & Storage, because we all need a little more assurance in life, especially our code.
  • Gave our codebase a spa day and a healthy diet.
  • Fix typos

@dharanad dharanad changed the title [WIP][Not for review] Add Unit Tests & Code Improvements [WIP] Add Unit Tests & Code Improvements Jul 31, 2024
@dharanad
Copy link
Collaborator Author

dharanad commented Jul 31, 2024

@vaibhawvipul I would also like to suggest few improvement in this PR. If that sounds fine ?
How about dropping the object once we close the connection ?

async fn close(&self) -> Result<(), Box<dyn Error + Send + Sync>> {

And when we delete the file ?
async fn delete(&self) -> Result<(), Box<dyn Error + Send + Sync>> {

@vaibhawvipul
Copy link
Contributor

@vaibhawvipul I would also like to suggest few improvement in this PR. If that sounds fine ? How about dropping the object once we close the connection ?

async fn close(&self) -> Result<(), Box<dyn Error + Send + Sync>> {

And when we delete the file ?

async fn delete(&self) -> Result<(), Box<dyn Error + Send + Sync>> {

Connection can be closed because of various reasons. Let's say we want to change the port.

I still would want to keep the logs because later on I want the server to do catch-up, instead of expecting complete logs from other servers, when it is restarted.

Does it make sense?

@vaibhawvipul vaibhawvipul added the work in progress PR is work in progress label Jul 31, 2024
@dharanad dharanad changed the title [WIP] Add Unit Tests & Code Improvements Add Unit Tests & Code Improvements Jul 31, 2024
@dharanad dharanad changed the title Add Unit Tests & Code Improvements Add Unit Tests for Network & Storage. And minor improvements Aug 1, 2024
@dharanad dharanad marked this pull request as ready for review August 1, 2024 11:02
@vaibhawvipul vaibhawvipul removed the work in progress PR is work in progress label Aug 1, 2024
Copy link
Contributor

@vaibhawvipul vaibhawvipul left a comment

Choose a reason for hiding this comment

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

LGTM

@vaibhawvipul vaibhawvipul merged commit 50b9f16 into spacewalkhq:main Aug 1, 2024
1 check passed
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.

Add unit tests
2 participants