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

http: simplify test and fix minor issues #210

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

bennyz
Copy link
Member

@bennyz bennyz commented Jan 5, 2025

  • simplify tests, and add a test for file retrieval
  • remove unused loop param
  • call shutdown before cleanup, as docs require

- simplify tests, and add a test for file retrieval
- remove unused loop param
- call shutdown before cleanup, as docs require

Signed-off-by: Benny Zlotnik <[email protected]>
@bennyz bennyz assigned bennyz and unassigned bennyz Jan 6, 2025
@bennyz bennyz requested a review from mangelajo January 6, 2025 08:08
files_after_deletion = client.list_files()
assert "test.txt" not in files_after_deletion
resource_uuid = uuid.uuid4()
server.resources[resource_uuid] = receive_stream
Copy link
Member

Choose a reason for hiding this comment

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

Hi, nice work,

Although I'd want us to consider if we still want to keep some test through the serve() / write_local_file method too.

The reason to propose it is that we otherwise stop testing the client slide at all, and all the inner interactions of client->exporter

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I figured I'd make it more similar to the tftp driver test and we can perhaps have a seperate test for the client, because in my initial attempt to do the HTTP GET in the context of serve didn't go well because of the mixed async/sync.
However, I will try again, perhaps it's simpler than it looks

Copy link
Member

Choose a reason for hiding this comment

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

Let's do it the way you think makes more sense, I will leave the accepted to this PR, and we can follow up with some client tests, or include it here.

Thank @bennyz !

@bennyz bennyz enabled auto-merge January 10, 2025 10:55
@bennyz bennyz merged commit 3f7c2bd into jumpstarter-dev:main Jan 10, 2025
8 checks 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.

2 participants