Skip to content

pytest suite using httpd+nghttpx, a start - #10175

Closed
icing wants to merge 1 commit into
curl:masterfrom
icing:httpd-tests
Closed

icing wants to merge 1 commit into
curl:masterfrom
icing:httpd-tests

Conversation

@icing

@icing icing commented Dec 28, 2022

Copy link
Copy Markdown
Contributor
Basic infra to run curl against an apache httpd plus nghttpx for h3.

- adding '--with-test-httpd=<path>' to configure non-standard apache2 install
- python env and base classes for running httpd
- basic tests for connectivity with h1/h2/h3

Comment thread tests/httpd/testenv/curl.py Resolved
Comment thread tests/httpd/testenv/curl.py Resolved
Comment thread tests/httpd/testenv/certs.py Resolved
Comment thread tests/httpd/testenv/certs.py Resolved

@bagder bagder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You added files in docs/examples/* by mistake!

Comment thread tests/httpd/config.ini.in Resolved
Comment thread tests/httpd/conftest.py Resolved
Comment thread tests/httpd/test_01_basic.py Resolved
Comment thread tests/httpd/testenv/__init__.py Resolved
Comment thread tests/httpd/testenv/__init__.py Resolved
@icing

icing commented Dec 28, 2022

Copy link
Copy Markdown
Contributor Author

You added files in docs/examples/* by mistake!

More examples are good! (removed them again, sorry)

Comment thread tests/httpd/testenv/certs.py Resolved
@icing
icing requested a review from bagder December 29, 2022 08:00
Comment thread .github/scripts/spellcheck.words Resolved
Comment thread tests/httpd/testenv/curl.py Resolved
Comment thread tests/httpd/testenv/curl.py Resolved
Comment thread tests/tests-httpd/testenv/curl.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Invalid Exception: Expression `"unknown ALPN protocol


ℹ️ Learn about @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Comment thread tests/tests-httpd/testenv/curl.py Resolved
Comment thread tests/tests-httpd/testenv/curl.py Resolved
Comment thread tests/tests-httpd/testenv/certs.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💬 9 similar findings have been found in this PR


Invalid type: Expression typing.Optional[typing.List[tests.tests.__sub__(httpd.testenv.certs.CertificateSpec)]] is not a valid type.


🔎 Expand here to view all instances of this finding
File Path Line Number
tests/tests-httpd/testenv/certs.py 118
tests/tests-httpd/testenv/certs.py 164
tests/tests-httpd/testenv/certs.py 167
tests/tests-httpd/testenv/certs.py 188
tests/tests-httpd/testenv/certs.py 192
tests/tests-httpd/testenv/certs.py 196
tests/tests-httpd/testenv/certs.py 196
tests/tests-httpd/testenv/certs.py 200
tests/tests-httpd/testenv/certs.py 200

Visit the Lift Web Console to find more details in your report.


ℹ️ Learn about @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Comment thread tests/tests-httpd/testenv/certs.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

35% of developers fix this issue

💬 12 similar findings have been found in this PR


Incompatible variable type: issuer is declared to have type Credentials but is used as type None.


🔎 Expand here to view all instances of this finding
File Path Line Number
tests/tests-httpd/testenv/certs.py 356
tests/tests-httpd/testenv/certs.py 356
tests/tests-httpd/testenv/certs.py 356
tests/tests-httpd/testenv/certs.py 372
tests/tests-httpd/testenv/certs.py 373
tests/tests-httpd/testenv/certs.py 376
tests/tests-httpd/testenv/certs.py 446
tests/tests-httpd/testenv/certs.py 471
tests/tests-httpd/testenv/curl.py 46
tests/tests-httpd/testenv/curl.py 47

Showing 10 of 12 findings. Visit the Lift Web Console to see all.


ℹ️ Learn about @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Comment thread tests/tests-httpd/testenv/certs.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

61% of developers fix this issue

💬 6 similar findings have been found in this PR


Incompatible parameter type: Expected Credentials for 3rd parameter issuer to call CertStore.load_credentials but got None.


🔎 Expand here to view all instances of this finding
File Path Line Number
tests/tests-httpd/testenv/certs.py 340
tests/tests-httpd/testenv/certs.py 344
tests/tests-httpd/testenv/certs.py 388
tests/tests-httpd/testenv/certs.py 482
tests/tests-httpd/testenv/certs.py 522
tests/tests-httpd/testenv/curl.py 240

Visit the Lift Web Console to find more details in your report.


ℹ️ Learn about @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Comment thread tests/tests-httpd/testenv/curl.py Resolved
Comment thread tests/tests-httpd/testenv/curl.py Resolved
Comment thread tests/tests-httpd/testenv/curl.py Resolved
Comment thread tests/tests-httpd/testenv/curl.py Resolved
Comment thread tests/tests-httpd/testenv/curl.py Resolved
Comment thread tests/tests-httpd/testenv/curl.py Resolved
Comment thread tests/tests-httpd/testenv/curl.py Resolved
Comment thread tests/tests-httpd/testenv/httpd.py Resolved
Comment thread lib/http2.c Resolved
Comment thread tests/tests-httpd/test_04_stuttered.py Resolved
Comment thread tests/tests-httpd/testenv/curl.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

55% of developers fix this issue

Incompatible parameter type: Expected `Variable[typing.AnyStr <


ℹ️ Learn about @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Comment thread tests/tests-httpd/test_04_stuttered.py Resolved
Comment thread tests/tests-httpd/testenv/nghttpx.py Resolved
Comment thread tests/tests-httpd/testenv/nghttpx.py Resolved
@icing

icing commented Jan 9, 2023

Copy link
Copy Markdown
Contributor Author

If CI works through this, I think it is a good first version to merge.

- adding '--with-test-httpd=<path>' to configure non-standard apache2 install
- python env and base classes for running httpd
- basic tests for connectivity with h1/h2/h3
- adding test cases for truncated responses in http versions.
- adding goaway test for HTTP/3.
- adding "stuttering" tests with parallel downloads in chunks with varying delays between chunks.
- adding a curltest module to the httpd server, adding GOAWAY test.
    - mod_curltest now installs 2 handlers
      - 'echo': writing as response body what came as request body
      - 'tweak': with query parameters to tweak response behaviour
- marked known fails as skip for now
@bagder

bagder commented Jan 9, 2023

Copy link
Copy Markdown
Member

Thanks!

@bagder bagder closed this in 33ac97e Jan 9, 2023
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
…ttpx for h3

- adding '--with-test-httpd=<path>' to configure non-standard apache2
  install
- python env and base classes for running httpd
- basic tests for connectivity with h1/h2/h3
- adding test cases for truncated responses in http versions.
- adding goaway test for HTTP/3.
- adding "stuttering" tests with parallel downloads in chunks with
  varying delays between chunks.

- adding a curltest module to the httpd server, adding GOAWAY test.
    - mod_curltest now installs 2 handlers
      - 'echo': writing as response body what came as request body
      - 'tweak': with query parameters to tweak response behaviour
- marked known fails as skip for now

Closes curl#10175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants