refactor(5 test files): selective imports + remove dangling (ADR-025 L2)
Five test files, 2 stars each -> selective. config/encryption_tests.nu: config/encryption.nu [7 symbols] kms/client.nu [kms-status] extensions/tests/test_cache.nu: extensions/cache.nu DROPPED (dead) utils/logger.nu REMOVED (file does not exist — dangling) extensions/tests/test_oci_client.nu: oci/client.nu [4 symbols] utils/logger.nu REMOVED (dangling) extensions/tests/test_discovery.nu: extensions/discovery.nu [5 symbols] utils/logger.nu REMOVED (dangling) config/loader/test.nu: config/validators.nu [validate-interpolation] config/interpolators DROPPED (dead) Pre-existing bug found and removed: 3 test files imported `../../utils/logger.nu` which doesn't exist. Star-import silenced the missing-file error; with selective imports it would fail. Cleanest fix: remove the dangling import (the files never actually used any symbols from logger.nu — it was a zombie import from a long-deleted file). Validation: 4 files 0 errors. encryption_tests.nu has 1 pre-existing error matching baseline. Refs: ADR-025
This commit is contained in:
parent
3e747e1317
commit
2f75500702
5 changed files with 23 additions and 10 deletions
|
|
@ -2,8 +2,12 @@
|
|||
# Comprehensive test suite for encryption functionality
|
||||
# Error handling: Guard patterns (no try-catch for field access)
|
||||
|
||||
use encryption.nu *
|
||||
use ../kms/client.nu *
|
||||
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||
use lib_provisioning/config/encryption.nu [
|
||||
contains-sensitive-data decrypt-config decrypt-config-memory encrypt-config
|
||||
is-encrypted-config load-encrypted-config validate-encryption-config
|
||||
]
|
||||
use lib_provisioning/kms/client.nu [kms-status]
|
||||
|
||||
# Test suite runner
|
||||
export def run-encryption-tests [
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@
|
|||
# Configuration Loader - Testing and Interpolation Functions
|
||||
# Provides testing utilities for configuration loading and interpolation
|
||||
|
||||
use ../interpolators.nu *
|
||||
use ../validators.nu *
|
||||
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||
# config/interpolators star-import was dead — dropped.
|
||||
use lib_provisioning/config/validators.nu [validate-interpolation]
|
||||
|
||||
# Test interpolation with sample data
|
||||
export def test-interpolation [
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#!/usr/bin/env nu
|
||||
# Tests for Extension Cache Module
|
||||
|
||||
use ../cache.nu *
|
||||
use ../../utils/logger.nu *
|
||||
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||
# extensions/cache star-import was dead (no used symbols in this test).
|
||||
# utils/logger.nu does not exist — dangling import removed.
|
||||
|
||||
# Test cache directory creation
|
||||
export def test_cache_dir [] {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
#!/usr/bin/env nu
|
||||
# Tests for Extension Discovery Module
|
||||
|
||||
use ../discovery.nu *
|
||||
use ../../utils/logger.nu *
|
||||
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||
# utils/logger.nu does not exist — dangling import removed.
|
||||
use lib_provisioning/extensions/discovery.nu [
|
||||
discover-local-extensions discover-oci-extensions get-extension-versions
|
||||
list-extensions search-extensions
|
||||
]
|
||||
|
||||
# Test local extension discovery
|
||||
export def test_discover_local [] {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
#!/usr/bin/env nu
|
||||
# Tests for OCI Client Module
|
||||
|
||||
use ../../oci/client.nu *
|
||||
use ../../utils/logger.nu *
|
||||
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||
# utils/logger.nu does not exist — dangling import removed.
|
||||
use lib_provisioning/oci/client.nu [
|
||||
build-artifact-ref get-oci-config is-oci-available test-oci-connection
|
||||
]
|
||||
|
||||
# Test OCI configuration loading
|
||||
export def test_oci_config [] {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue