Skip to content

Commit

Permalink
run client compat tests with git protocol version 0, too
Browse files Browse the repository at this point in the history
  • Loading branch information
stspdotname committed Jun 11, 2024
1 parent d2122f0 commit 0dfa109
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/compat/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
run_git_or_fail,
)

from unittest.mock import patch

if sys.platform == "win32":
import ctypes

Expand Down Expand Up @@ -422,6 +424,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 +479,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 +500,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 +691,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

0 comments on commit 0dfa109

Please sign in to comment.