controller v0.267.0: tests off DooPlex's Docker, cut-off copies refused, two pages true
gates / gates (push) Successful in 26s
gates / gates (push) Successful in 26s
R-650: internal/dockerexec — every docker exec routed through it; under go test a real docker is refused (opt-in FELHOM_TEST_REAL_DOCKER=1; a stub under the temp dir is allowed). api/stacks/web tests run under a silent stub (TestMain). TestR650_NoBareDockerExec pins it repo-wide. R-640: a dump without its engine's completion marker is refused before the first mutation (unit + off-site restore) and again before any load. R-499: the Tier-2 page's system-disk sentence has four true branches. R-518: the backup button states the measured ~8 min stop. R-626: measured on 9202, not reproduced. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -2,10 +2,10 @@ package stacks
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/dockerexec"
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/util"
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -98,7 +98,7 @@ func (m *Manager) SambaImagePresent() bool {
|
||||
if m.sambaImgFn != nil {
|
||||
return m.sambaImgFn()
|
||||
}
|
||||
return exec.Command("docker", "image", "inspect", infra.SambaImage).Run() == nil
|
||||
return dockerexec.Command("docker", "image", "inspect", infra.SambaImage).Run() == nil
|
||||
}
|
||||
|
||||
// shareAvailable reports whether a share's folder can be exported right now: its owning registered
|
||||
@@ -287,7 +287,7 @@ func (m *Manager) sambaSetPassword(password string) error {
|
||||
var lastErr error
|
||||
// The container may need a moment to accept exec right after `compose up -d`.
|
||||
for attempt := 1; attempt <= 10; attempt++ {
|
||||
cmd := exec.Command("docker", "exec", "-i", sambaContainer,
|
||||
cmd := dockerexec.Command("docker", "exec", "-i", sambaContainer,
|
||||
"smbpasswd", "-s", "-a", infra.SambaHouseholdUser)
|
||||
cmd.Stdin = strings.NewReader(password + "\n" + password + "\n")
|
||||
out, err := cmd.CombinedOutput()
|
||||
@@ -350,7 +350,7 @@ func (m *Manager) sambaLANAddr() (string, error) {
|
||||
if m.sambaAddrFn != nil {
|
||||
return m.sambaAddrFn()
|
||||
}
|
||||
out, err := exec.Command("docker", "exec", sambaContainer,
|
||||
out, err := dockerexec.Command("docker", "exec", sambaContainer,
|
||||
"ip", "-4", "-o", "addr", "show", infra.SambaHostInterface).Output()
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("docker exec ip addr: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user