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 initial support for Git protocol v2 #1244

Merged
merged 12 commits into from
Jun 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
run client compat tests with git protocol version 0, too
  • Loading branch information
stspdotname committed Jun 25, 2024
commit 0e18ede32f1d8c0db2a97f49b22babdd9412e72a
21 changes: 21 additions & 0 deletions tests/compat/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import threading
from contextlib import suppress
from io import BytesIO
from unittest.mock import patch
from urllib.parse import unquote

from dulwich import client, file, index, objects, protocol, repo
Expand Down Expand Up @@ -422,6 +423,11 @@ def test_send_remove_branch(self):
self.skipTest("skip flaky test; see #1015")


@patch("dulwich.protocol.DEFAULT_GIT_PROTOCOL_VERSION_FETCH", new=0)
class DulwichTCPClientTestGitProtov0(DulwichTCPClientTest):
pass


class TestSSHVendor:
@staticmethod
def run_command(
Expand Down Expand Up @@ -472,6 +478,11 @@ def _build_path(self, path):
return self.gitroot + path


@patch("dulwich.protocol.DEFAULT_GIT_PROTOCOL_VERSION_FETCH", new=0)
class DulwichMockSSHClientTestGitProtov0(DulwichMockSSHClientTest):
pass


class DulwichSubprocessClientTest(CompatTestCase, DulwichClientTestBase):
def setUp(self):
CompatTestCase.setUp(self)
Expand All @@ -488,6 +499,11 @@ def _build_path(self, path):
return self.gitroot + path


@patch("dulwich.protocol.DEFAULT_GIT_PROTOCOL_VERSION_FETCH", new=0)
class DulwichSubprocessClientTestGitProtov0(DulwichSubprocessClientTest):
pass


class GitHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
"""HTTP Request handler that calls out to 'git http-backend'."""

Expand Down Expand Up @@ -674,3 +690,8 @@ def _build_path(self, path):

def test_archive(self):
raise SkipTest("exporting archives not supported over http")


@patch("dulwich.protocol.DEFAULT_GIT_PROTOCOL_VERSION_FETCH", new=0)
class DulwichHttpClientTestGitProtov0(DulwichHttpClientTest):
pass