Skip to content

test-gvfs-protocol.c, t5799-gvfs-helper.sh: unit tests for gvfs-helper #216

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

Conversation

jeffhostetler
Copy link

@jeffhostetler jeffhostetler commented Oct 31, 2019

[READY FOR REVIEW]

Git-style tests for gvfs-helper.

This series contains:

  • t/helper/test-gvfs-protocol, a test/mock HTTP server that speaks the GVFS Protocol and can return objects requested via the /gvfs/objects/[{oid}] GET and POST end-points. This will let us locally test the gvfs-helper mechanism to supply missing objects without the need for a remote Azure Repos or GVFS Cache-Server. And will let us drive full testing of the Git C layer on all platforms (before we do integration/functional testing of the VFS4G and peer C# layers).

  • A Git-style test script t/t5799-gvfs-helper.sh which will exercise the above. Part 1 contains raw tests between gvfs-helper and test-gvfs-protocol in isolation. Part 2 does end-to-end integration tests starting with variousgit.exe commands.

BTW I forgot to rebase this on to features 2.24. I'll do that after we're happy with this version.

Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

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

I understand that this is a WIP, but maybe a couple of early comments help.

@jeffhostetler jeffhostetler force-pushed the users/jeffhost/test-gvfs-helper branch from 08a1550 to 7577012 Compare November 7, 2019 20:09
@jeffhostetler jeffhostetler changed the title WIP [DO NOT MERGE] first attempt at unit-test for gvfs-helper test-gvfs-protocol.c, t5799-gvfs-helper.sh: unit tests for gvfs-helper Nov 7, 2019
Copy link
Member

@wilbaker wilbaker left a comment

Choose a reason for hiding this comment

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

I am still looking through the changes, but posting comments that I have so far.

Create t/helper/test-gvfs-protocol.c and t/t5799-gvfs-helper.sh
to test gvfs-helper.

Create t/helper/test-gvfs-protocol.c as a stand-alone web server that
speaks the GVFS Protocol [1] and serves loose objects and packfiles
to clients.  It is borrows heavily from the code in daemon.c.
It includes a "mayhem" mode to cause various network and HTTP errors
to test the retry/recovery ability of gvfs-helper.

Create t/t5799-gvfs-helper.sh to test gvfs-helper.

[1] https://github.com/microsoft/VFSForGit/blob/master/Protocol.md

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
@jeffhostetler
Copy link
Author

I'm closing this PR based on 2.23 in favor of #220 which is based on 2.24.

@jeffhostetler jeffhostetler deleted the users/jeffhost/test-gvfs-helper branch October 20, 2020 16:50
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.

3 participants