f7e9549779
CI / load-versions (pull_request) Successful in 18s
CI / push-validation (pull_request) Successful in 26s
CI / build (pull_request) Successful in 47s
CI / lint (pull_request) Failing after 1m0s
CI / quality (pull_request) Successful in 1m3s
CI / typecheck (pull_request) Successful in 1m12s
CI / security (pull_request) Successful in 1m19s
CI / helm (pull_request) Successful in 44s
CI / unit_tests (pull_request) Failing after 2m51s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 10m52s
CI / status-check (pull_request) Failing after 4s
Add more feature tests. Issues closed: #865
43 lines
2.3 KiB
Gherkin
43 lines
2.3 KiB
Gherkin
Feature: Devcontainer spec uncovered-line coverage
|
|
|
|
Scenario: MountType rejects invalid mount type value
|
|
When I create a devcontainer mount with source "/foo" target "/bar" and mount_type "invalid"
|
|
Then a ValueError should be raised containing "mount_type must be one of"
|
|
|
|
Scenario: Invalid mount type for tmpfs also rejected
|
|
When I create a devcontainer mount with source "/foo" target "/bar" and mount_type "tmpfs2"
|
|
Then a ValueError should be raised containing "mount_type must be one of"
|
|
|
|
Scenario: DevContainerSpec coerces port list with mixed string values
|
|
Given a devcontainer spec with forwarded ports as list ["8080", "abc", "443"]
|
|
When I parse the spec into a DevContainerSpec
|
|
Then all forwarded ports should be int type in the result
|
|
|
|
Scenario: DevcontainerSpec rejects port value that cannot be parsed to int with warning logged
|
|
Given a devcontainer spec with forwarded ports as non-integer strings ["notaport", "also_not"]
|
|
When I parse the spec into a DevContainerSpec
|
|
Then all forwarded ports should be int type in the result
|
|
|
|
Scenario: Parse mount string returns None for empty string
|
|
When I create an invalid mount type "" for _parse_mount_string
|
|
Then _parse_mount_string return_value should be None
|
|
|
|
Scenario: Key-value format without source returns None from _parse_mount_string
|
|
Given a devcontainer mount with key=value format "target=/foo" and no_source
|
|
When I attempt to parse it using _parse_mount_string
|
|
Then parse_result of mount string _result should be None
|
|
|
|
Scenario: Mount string with only type keyword not enough params returns None from _parse_mount_string
|
|
Given a devcontainer mount with key=value format "type=bind" and no_other_params
|
|
When I attempt to parse it using _parse_mount_string
|
|
Then parse_result of mount_string_no_source should be None
|
|
|
|
Scenario: Mount string without "=" or ":" returns None from _parse_mount_string
|
|
Given a devcontainer mount that is just "random-string-without-equal-or-colon"
|
|
When I attempt to parse it using _parse_mount_string
|
|
Then result from mount_string with no equal and no_colon should be None
|
|
|
|
Scenario: parse_devcontainer_json_string rejects non-JSON list input
|
|
When I attempt parse_devcontainer_json_string with JSON array string
|
|
Then ValueError should be raised for devcontainer json must contain a JSON object
|