2025-10-07 10:32:04 +01:00
|
|
|
|
# Tests for OCI Registry functionality
|
|
|
|
|
|
|
|
|
|
|
|
use std assert
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Registry directory exists
|
|
|
|
|
|
export def test_registry_directories [] {
|
|
|
|
|
|
print "Testing registry directories..."
|
|
|
|
|
|
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
let base = "($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
|
|
assert ($"($base)/zot" | path exists)
|
|
|
|
|
|
assert ($"($base)/harbor" | path exists)
|
|
|
|
|
|
assert ($"($base)/distribution" | path exists)
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Registry directories exist"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Zot configuration valid
|
|
|
|
|
|
export def test_zot_config [] {
|
|
|
|
|
|
print "Testing Zot configuration..."
|
|
|
|
|
|
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
let config_path = "($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/zot/config.json"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
|
|
assert ($config_path | path exists)
|
|
|
|
|
|
|
|
|
|
|
|
let config = (open $config_path)
|
|
|
|
|
|
|
|
|
|
|
|
assert ($config | get distSpecVersion | is-not-empty)
|
|
|
|
|
|
assert ($config | get storage.rootDirectory | is-not-empty)
|
|
|
|
|
|
assert (($config | get http.port) == "5000")
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Zot configuration valid"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Harbor configuration valid
|
|
|
|
|
|
export def test_harbor_config [] {
|
|
|
|
|
|
print "Testing Harbor configuration..."
|
|
|
|
|
|
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
let config_path = "($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/harbor/harbor.yml"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
|
|
assert ($config_path | path exists)
|
|
|
|
|
|
|
|
|
|
|
|
# Just check it's a valid file
|
|
|
|
|
|
let config_size = (ls $config_path | first | get size | into int)
|
|
|
|
|
|
assert ($config_size > 0)
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Harbor configuration valid"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Distribution configuration valid
|
|
|
|
|
|
export def test_distribution_config [] {
|
|
|
|
|
|
print "Testing Distribution configuration..."
|
|
|
|
|
|
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
let config_path = "($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/distribution/config.yml"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
|
|
assert ($config_path | path exists)
|
|
|
|
|
|
|
|
|
|
|
|
# Just check it's a valid file
|
|
|
|
|
|
let config_size = (ls $config_path | first | get size | into int)
|
|
|
|
|
|
assert ($config_size > 0)
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Distribution configuration valid"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Docker Compose files valid
|
|
|
|
|
|
export def test_docker_compose_files [] {
|
|
|
|
|
|
print "Testing Docker Compose files..."
|
|
|
|
|
|
|
|
|
|
|
|
let files = [
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
"($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/zot/docker-compose.yml"
|
|
|
|
|
|
"($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/harbor/docker-compose.yml"
|
|
|
|
|
|
"($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/distribution/docker-compose.yml"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
for file in $files {
|
|
|
|
|
|
assert ($file | path exists)
|
|
|
|
|
|
|
|
|
|
|
|
let file_size = (ls $file | first | get size | into int)
|
|
|
|
|
|
assert ($file_size > 0)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Docker Compose files valid"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Scripts exist and executable
|
|
|
|
|
|
export def test_scripts [] {
|
|
|
|
|
|
print "Testing scripts..."
|
|
|
|
|
|
|
|
|
|
|
|
let scripts = [
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
"($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/scripts/init-registry.nu"
|
|
|
|
|
|
"($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/scripts/setup-namespaces.nu"
|
|
|
|
|
|
"($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/scripts/configure-policies.nu"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
for script in $scripts {
|
|
|
|
|
|
assert ($script | path exists)
|
|
|
|
|
|
|
|
|
|
|
|
let file_size = (ls $script | first | get size | into int)
|
|
|
|
|
|
assert ($file_size > 0)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Scripts valid"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Commands module exists
|
|
|
|
|
|
export def test_commands_module [] {
|
|
|
|
|
|
print "Testing commands module..."
|
|
|
|
|
|
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
let module_path = "($env.PROVISIONING)/core/nulib/lib_provisioning/oci_registry/commands.nu"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
assert ($module_path | path exists)
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Commands module exists"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Service module exists
|
|
|
|
|
|
export def test_service_module [] {
|
|
|
|
|
|
print "Testing service module..."
|
|
|
|
|
|
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
let module_path = "($env.PROVISIONING)/core/nulib/lib_provisioning/oci_registry/service.nu"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
assert ($module_path | path exists)
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Service module exists"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Namespace definitions
|
|
|
|
|
|
export def test_namespace_definitions [] {
|
|
|
|
|
|
print "Testing namespace definitions..."
|
|
|
|
|
|
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
let script = "($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/scripts/setup-namespaces.nu"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
|
|
assert ($script | path exists)
|
|
|
|
|
|
|
|
|
|
|
|
let file_size = (ls $script | first | get size | into int)
|
|
|
|
|
|
assert ($file_size > 0)
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Namespace definitions valid"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Policy definitions
|
|
|
|
|
|
export def test_policy_definitions [] {
|
|
|
|
|
|
print "Testing policy definitions..."
|
|
|
|
|
|
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
let script = "($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/scripts/configure-policies.nu"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
|
|
assert ($script | path exists)
|
|
|
|
|
|
|
|
|
|
|
|
let file_size = (ls $script | first | get size | into int)
|
|
|
|
|
|
assert ($file_size > 0)
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Policy definitions valid"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Health check logic
|
|
|
|
|
|
export def test_health_check [] {
|
|
|
|
|
|
print "Testing health check logic..."
|
|
|
|
|
|
|
|
|
|
|
|
# Just verify the concept - actual check requires running registry
|
|
|
|
|
|
print " ℹ Health check requires running registry (skipped)"
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Health check logic valid"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Test: Registry type validation
|
|
|
|
|
|
export def test_registry_types [] {
|
|
|
|
|
|
print "Testing registry types..."
|
|
|
|
|
|
|
|
|
|
|
|
let valid_types = ["zot", "harbor", "distribution"]
|
|
|
|
|
|
|
|
|
|
|
|
for type in $valid_types {
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
|
let path = $"($env.HOME | path join "project-provisioning/provisioning/platform/oci-registry")/($type)"
|
2025-10-07 10:32:04 +01:00
|
|
|
|
assert ($path | path exists)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
print "✅ Registry types valid"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Run all tests
|
|
|
|
|
|
export def main [] {
|
|
|
|
|
|
print "Running OCI Registry tests...\n"
|
|
|
|
|
|
|
|
|
|
|
|
test_registry_directories
|
|
|
|
|
|
test_zot_config
|
|
|
|
|
|
test_harbor_config
|
|
|
|
|
|
test_distribution_config
|
|
|
|
|
|
test_docker_compose_files
|
|
|
|
|
|
test_scripts
|
|
|
|
|
|
test_commands_module
|
|
|
|
|
|
test_service_module
|
|
|
|
|
|
test_namespace_definitions
|
|
|
|
|
|
test_policy_definitions
|
|
|
|
|
|
test_health_check
|
|
|
|
|
|
test_registry_types
|
|
|
|
|
|
|
|
|
|
|
|
print "\n✅ All OCI Registry tests passed!"
|
|
|
|
|
|
}
|