mirror of
https://github.com/bytedance/g3.git
synced 2026-05-18 23:42:21 +00:00
add more httpbin testcases in CI
Some checks are pending
CodeCoverage / lib unit test (push) Waiting to run
CodeCoverage / g3proxy test (push) Waiting to run
CodeCoverage / g3bench test (push) Waiting to run
CodeCoverage / g3statsd test (push) Waiting to run
CrossCompiling / Build (push) Waiting to run
Linux-CI / Build (push) Waiting to run
Linux-CI / Clippy (push) Waiting to run
Linux-CI / Build vendored (push) Waiting to run
Linux-CI / Build with OpenSSL Async Job (push) Waiting to run
MacOS-CI / Build (push) Waiting to run
MacOS-CI / Build vendored (push) Waiting to run
StaticLinking / musl (push) Waiting to run
StaticLinking / msvc (push) Waiting to run
Windows-CI / Build (push) Waiting to run
Windows-CI / Build vendored (push) Waiting to run
Some checks are pending
CodeCoverage / lib unit test (push) Waiting to run
CodeCoverage / g3proxy test (push) Waiting to run
CodeCoverage / g3bench test (push) Waiting to run
CodeCoverage / g3statsd test (push) Waiting to run
CrossCompiling / Build (push) Waiting to run
Linux-CI / Build (push) Waiting to run
Linux-CI / Clippy (push) Waiting to run
Linux-CI / Build vendored (push) Waiting to run
Linux-CI / Build with OpenSSL Async Job (push) Waiting to run
MacOS-CI / Build (push) Waiting to run
MacOS-CI / Build vendored (push) Waiting to run
StaticLinking / musl (push) Waiting to run
StaticLinking / msvc (push) Waiting to run
Windows-CI / Build (push) Waiting to run
Windows-CI / Build vendored (push) Waiting to run
This commit is contained in:
parent
1870adf52a
commit
98385ba8e8
2 changed files with 56 additions and 0 deletions
|
|
@ -51,6 +51,25 @@ class TestHttpBin(unittest.TestCase):
|
|||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
|
||||
def test_get_delay(self):
|
||||
self.set_url_and_request_target('/delay/1')
|
||||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
|
||||
def test_get_chunked_small(self):
|
||||
self.set_url_and_request_target('/stream/1')
|
||||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
|
||||
self.set_url_and_request_target('/stream/4')
|
||||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
|
||||
def test_get_chunked_large(self):
|
||||
self.set_url_and_request_target('/stream/100')
|
||||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
|
||||
def test_basic_auth_get(self):
|
||||
self.set_url_and_request_target('/basic-auth/name/pass')
|
||||
self.c.perform()
|
||||
|
|
@ -139,6 +158,15 @@ class TestHttpBin(unittest.TestCase):
|
|||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
file.close()
|
||||
|
||||
def test_put_file_delay(self):
|
||||
self.set_url_and_request_target('/delay/1')
|
||||
self.c.setopt(pycurl.UPLOAD, 1)
|
||||
file = open(__file__)
|
||||
self.c.setopt(pycurl.READDATA, file)
|
||||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
file.close()
|
||||
|
||||
def test_put_file_chunked(self):
|
||||
self.set_url_and_request_target('/put')
|
||||
self.c.setopt(pycurl.UPLOAD, 1)
|
||||
|
|
|
|||
|
|
@ -47,6 +47,25 @@ class TestHttpBin(unittest.TestCase):
|
|||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
|
||||
def test_get_delay(self):
|
||||
self.set_url_and_request_target('/delay/1')
|
||||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
|
||||
def test_get_chunked_small(self):
|
||||
self.set_url_and_request_target('/stream/1')
|
||||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
|
||||
self.set_url_and_request_target('/stream/4')
|
||||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
|
||||
def test_get_chunked_large(self):
|
||||
self.set_url_and_request_target('/stream/100')
|
||||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
|
||||
def test_basic_auth_get(self):
|
||||
self.set_url_and_request_target('/basic-auth/name/pass')
|
||||
self.c.perform()
|
||||
|
|
@ -96,6 +115,15 @@ class TestHttpBin(unittest.TestCase):
|
|||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
file.close()
|
||||
|
||||
def test_put_file_delay(self):
|
||||
self.set_url_and_request_target('/delay/1')
|
||||
self.c.setopt(pycurl.UPLOAD, 1)
|
||||
file = open(__file__)
|
||||
self.c.setopt(pycurl.READDATA, file)
|
||||
self.c.perform()
|
||||
self.assertEqual(self.c.getinfo(pycurl.RESPONSE_CODE), 200)
|
||||
file.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue