31472b5413
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / helm (pull_request) Successful in 22s
CI / lint (pull_request) Successful in 3m20s
CI / quality (pull_request) Successful in 3m43s
CI / typecheck (pull_request) Successful in 3m58s
CI / security (pull_request) Successful in 4m8s
CI / integration_tests (pull_request) Successful in 9m33s
CI / unit_tests (pull_request) Successful in 10m12s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m18s
CI / e2e_tests (pull_request) Successful in 19m51s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 15s
CI / helm (push) Successful in 22s
CI / lint (push) Successful in 3m18s
CI / quality (push) Successful in 3m41s
CI / typecheck (push) Successful in 3m57s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m10s
CI / unit_tests (push) Failing after 6m58s
CI / docker (push) Has been skipped
CI / integration_tests (push) Successful in 9m15s
CI / coverage (push) Successful in 12m26s
CI / e2e_tests (push) Successful in 23m11s
CI / status-check (push) Failing after 1s
CI / benchmark-publish (push) Successful in 28m31s
CI / benchmark-regression (pull_request) Successful in 54m53s
Add Behave feature/step pairs that exercise uncovered branches across handlers, LSP, CLI, and service layers to reach the coverage gate. ISSUES CLOSED: #1232
63 lines
3.7 KiB
Gherkin
63 lines
3.7 KiB
Gherkin
Feature: Sandbox Manager Coverage Round 3
|
|
Exercises uncovered lines in SandboxManager:
|
|
- TransactionSandbox branch in commit_all (lines 287-295)
|
|
- resolve_sandbox_key validation (lines 567, 569)
|
|
- get_or_create_sandbox_for_resource validation (lines 606, 608, 610, 623)
|
|
|
|
Background:
|
|
Given smcov3 a sandbox factory instance
|
|
And smcov3 a sandbox manager with the factory
|
|
|
|
# -- TransactionSandbox non-rollbackable classification in commit_all ------
|
|
|
|
Scenario: commit_all classifies a TransactionSandbox as non-rollbackable
|
|
Given smcov3 a sandbox exists for plan "plan-t1" resource "res-t1" path "/tmp/r1" strategy "none"
|
|
And smcov3 the sandbox for plan "plan-t1" resource "res-t1" is replaced with a transaction sandbox mock
|
|
When smcov3 I commit all sandboxes for plan "plan-t1"
|
|
Then smcov3 the commit results should contain 1 successful result
|
|
And smcov3 no error should have been raised
|
|
|
|
Scenario: commit_all orders TransactionSandbox after rollbackable sandboxes
|
|
Given smcov3 a sandbox exists for plan "plan-t2" resource "res-r1" path "/tmp/r1" strategy "none"
|
|
And smcov3 the sandbox for plan "plan-t2" resource "res-r1" is replaced with a committable mock
|
|
And smcov3 a sandbox exists for plan "plan-t2" resource "res-t1" path "/tmp/t1" strategy "none"
|
|
And smcov3 the sandbox for plan "plan-t2" resource "res-t1" is replaced with a transaction sandbox mock
|
|
And smcov3 a sandbox exists for plan "plan-t2" resource "res-fail" path "/tmp/f1" strategy "none"
|
|
And smcov3 the sandbox for plan "plan-t2" resource "res-fail" will fail on commit
|
|
When smcov3 I commit all sandboxes for plan "plan-t2"
|
|
Then smcov3 the transaction sandbox mock for plan "plan-t2" resource "res-t1" should not have been committed
|
|
|
|
Scenario: commit_all with only a TransactionSandbox commits successfully
|
|
Given smcov3 a sandbox exists for plan "plan-t3" resource "res-t1" path "/tmp/t1" strategy "none"
|
|
And smcov3 the sandbox for plan "plan-t3" resource "res-t1" is replaced with a transaction sandbox mock
|
|
When smcov3 I commit all sandboxes for plan "plan-t3"
|
|
Then smcov3 the commit results should contain 1 successful result
|
|
|
|
# -- resolve_sandbox_key validation ----------------------------------------
|
|
|
|
Scenario: resolve_sandbox_key rejects None resource
|
|
When smcov3 I call resolve_sandbox_key with None resource
|
|
Then smcov3 a ValueError should have been raised with message "resource cannot be None"
|
|
|
|
Scenario: resolve_sandbox_key rejects None resource_registry
|
|
When smcov3 I call resolve_sandbox_key with None resource_registry
|
|
Then smcov3 a ValueError should have been raised with message "resource_registry cannot be None"
|
|
|
|
# -- get_or_create_sandbox_for_resource validation -------------------------
|
|
|
|
Scenario: get_or_create_sandbox_for_resource rejects empty plan_id
|
|
When smcov3 I call get_or_create_sandbox_for_resource with empty plan_id
|
|
Then smcov3 a ValueError should have been raised with message "plan_id cannot be empty"
|
|
|
|
Scenario: get_or_create_sandbox_for_resource rejects None resource
|
|
When smcov3 I call get_or_create_sandbox_for_resource with None resource
|
|
Then smcov3 a ValueError should have been raised with message "resource cannot be None"
|
|
|
|
Scenario: get_or_create_sandbox_for_resource rejects None resource_registry
|
|
When smcov3 I call get_or_create_sandbox_for_resource with None resource_registry
|
|
Then smcov3 a ValueError should have been raised with message "resource_registry cannot be None"
|
|
|
|
Scenario: get_or_create_sandbox_for_resource rejects boundary with no location
|
|
When smcov3 I call get_or_create_sandbox_for_resource with a boundary that has no location
|
|
Then smcov3 a ValueError should have been raised with message "has no location"
|