Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tests fail because CLI options are parsed #465

Closed
Labels
bugSomething isn't workingtestingv2v2 release
Milestone
@fpletz

Description

@fpletz

Search for duplicate issues

  • I already searched, and this issue is not a duplicate.

Issue scope

CLI

Describe the bug

Some tests load custom settings but also parse the CLI options. When tests are being run with parameters like--test-threads 1, some tests fail because static-web-server itself does not have such an option.

How to reproduce it

cargo test -- --test-threads 1

Expected behavior

Tests succeed.

Complementary information

The option to specify the test threads is even mentioned in the Rust book:https://doc.rust-lang.org/book/ch11-02-running-tests.html#running-tests-in-parallel-or-consecutively

Failing log:

     Running tests/handler.rs (target/x86_64-unknown-linux-gnu/release/deps/handler-c38b80b7779dbedd)running 2 testserror: unexpected argument '--test-threads' found  tip: a similar argument exists: '--security-headers'Usage: handler-c38b80b7779dbedd <--host <HOST>|--port <PORT>|--fd <FD>|--threads-multiplier <THREADS_MULTIPLIER>|--max-blocking-threads <MAX_BLOCKING_THREADS>|--root <ROOT>|--page50x <PAGE50X>|--page404 <PAGE404>|--page-fallback <PAGE_FALLBACK>|--log-level <LOG_LEVEL>|--cors-allow-origins <CORS_ALLOW_ORIGINS>|--cors-allow-headers <CORS_ALLOW_HEADERS>|--cors-expose-headers <CORS_EXPOSE_HEADERS>|--http2[=<HTTP2>]|--http2-tls-cert <HTTP2_TLS_CERT>|--http2-tls-key <HTTP2_TLS_KEY>|--https-redirect[=<HTTPS_REDIRECT>]|--https-redirect-host <HTTPS_REDIRECT_HOST>|--https-redirect-from-port <HTTPS_REDIRECT_FROM_PORT>|--https-redirect-from-hosts <HTTPS_REDIRECT_FROM_HOSTS>|--index-files <INDEX_FILES>|--compression[=<COMPRESSION>]|--compression-level <COMPRESSION_LEVEL>|--compression-static[=<COMPRESSION_STATIC>]|--directory-listing[=<DIRECTORY_LISTING>]|--directory-listing-order <DIRECTORY_LISTING_ORDER>|--directory-listing-format <DIRECTORY_LISTING_FORMAT>|--security-headers[=<SECURITY_HEADERS>]|--cache-control-headers[=<CACHE_CONTROL_HEADERS>]|--basic-auth <BASIC_AUTH>|--grace-period <GRACE_PERIOD>|--config-file <CONFIG_FILE>|--log-remote-address[=<LOG_REMOTE_ADDRESS>]|--redirect-trailing-slash[=<REDIRECT_TRAILING_SLASH>]|--ignore-hidden-files[=<IGNORE_HIDDEN_FILES>]|--disable-symlinks[=<DISABLE_SYMLINKS>]|--health[=<HEALTH>]|--maintenance-mode[=<MAINTENANCE_MODE>]|--maintenance-mode-status <MAINTENANCE_MODE_STATUS>|--maintenance-mode-file <MAINTENANCE_MODE_FILE>|--version>For more information, try '--help'.error: unexpected argument '--test-threads' found  tip: a similar argument exists: '--security-headers'Usage: handler-c38b80b7779dbedd <--host <HOST>|--port <PORT>|--fd <FD>|--threads-multiplier <THREADS_MULTIPLIER>|--max-blocking-threads <MAX_BLOCKING_THREADS>|--root <ROOT>|--page50x <PAGE50X>|--page404 <PAGE404>|--page-fallback <PAGE_FALLBACK>|--log-level <LOG_LEVEL>|--cors-allow-origins <CORS_ALLOW_ORIGINS>|--cors-allow-headers <CORS_ALLOW_HEADERS>|--cors-expose-headers <CORS_EXPOSE_HEADERS>|--http2[=<HTTP2>]|--http2-tls-cert <HTTP2_TLS_CERT>|--http2-tls-key <HTTP2_TLS_KEY>|--https-redirect[=<HTTPS_REDIRECT>]|--https-redirect-host <HTTPS_REDIRECT_HOST>|--https-redirect-from-port <HTTPS_REDIRECT_FROM_PORT>|--https-redirect-from-hosts <HTTPS_REDIRECT_FROM_HOSTS>|--index-files <INDEX_FILES>|--compression[=<COMPRESSION>]|--compression-level <COMPRESSION_LEVEL>|--compression-static[=<COMPRESSION_STATIC>]|--directory-listing[=<DIRECTORY_LISTING>]|--directory-listing-order <DIRECTORY_LISTING_ORDER>|--directory-listing-format <DIRECTORY_LISTING_FORMAT>|--security-headers[=<SECURITY_HEADERS>]|--cache-control-headers[=<CACHE_CONTROL_HEADERS>]|--basic-auth <BASIC_AUTH>|--grace-period <GRACE_PERIOD>|--config-file <CONFIG_FILE>|--log-remote-address[=<LOG_REMOTE_ADDRESS>]|--redirect-trailing-slash[=<REDIRECT_TRAILING_SLASH>]|--ignore-hidden-files[=<IGNORE_HIDDEN_FILES>]|--disable-symlinks[=<DISABLE_SYMLINKS>]|--health[=<HEALTH>]|--maintenance-mode[=<MAINTENANCE_MODE>]|--maintenance-mode-status <MAINTENANCE_MODE_STATUS>|--maintenance-mode-file <MAINTENANCE_MODE_FILE>|--version>For more information, try '--help'.error: test failed, to rerun pass `--test handler`Caused by:  process didn't exit successfully: `/build/source/target/x86_64-unknown-linux-gnu/release/deps/handler-c38b80b7779dbedd --test-threads=24` (exit status: 2)

Build target

Built from source (specify below)

Environment and specs

  • static-web-server: v1.32.1

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtestingv2v2 release

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp