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 83dde9f
Showing 1 changed file with 21 additions and 0 deletions.
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

0 comments on commit 83dde9f

Please sign in to comment.