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
|
# Comprehensive test suite for encryption functionality
|
||||||
# Error handling: Guard patterns (no try-catch for field access)
|
# Error handling: Guard patterns (no try-catch for field access)
|
||||||
|
|
||||||
use encryption.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ../kms/client.nu *
|
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
|
# Test suite runner
|
||||||
export def run-encryption-tests [
|
export def run-encryption-tests [
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,9 @@
|
||||||
# Configuration Loader - Testing and Interpolation Functions
|
# Configuration Loader - Testing and Interpolation Functions
|
||||||
# Provides testing utilities for configuration loading and interpolation
|
# Provides testing utilities for configuration loading and interpolation
|
||||||
|
|
||||||
use ../interpolators.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ../validators.nu *
|
# config/interpolators star-import was dead — dropped.
|
||||||
|
use lib_provisioning/config/validators.nu [validate-interpolation]
|
||||||
|
|
||||||
# Test interpolation with sample data
|
# Test interpolation with sample data
|
||||||
export def test-interpolation [
|
export def test-interpolation [
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
#!/usr/bin/env nu
|
#!/usr/bin/env nu
|
||||||
# Tests for Extension Cache Module
|
# Tests for Extension Cache Module
|
||||||
|
|
||||||
use ../cache.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ../../utils/logger.nu *
|
# 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
|
# Test cache directory creation
|
||||||
export def test_cache_dir [] {
|
export def test_cache_dir [] {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
#!/usr/bin/env nu
|
#!/usr/bin/env nu
|
||||||
# Tests for Extension Discovery Module
|
# Tests for Extension Discovery Module
|
||||||
|
|
||||||
use ../discovery.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ../../utils/logger.nu *
|
# 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
|
# Test local extension discovery
|
||||||
export def test_discover_local [] {
|
export def test_discover_local [] {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
#!/usr/bin/env nu
|
#!/usr/bin/env nu
|
||||||
# Tests for OCI Client Module
|
# Tests for OCI Client Module
|
||||||
|
|
||||||
use ../../oci/client.nu *
|
# Selective imports (ADR-025 Phase 3 Layer 2).
|
||||||
use ../../utils/logger.nu *
|
# 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
|
# Test OCI configuration loading
|
||||||
export def test_oci_config [] {
|
export def test_oci_config [] {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue