refactor!: rename module and move CLI to cmd/cephmig

Use the repository path git.zb-server.de/Sebi/CephfsMig as module
path instead of the non-importable name CephMig, and move the cephmig
entry point from the repository root to cmd/cephmig next to
cmd/nativeprobe. Makefile and Dockerfile.native build the new path.

BREAKING CHANGE: import paths change from CephMig/... to
git.zb-server.de/Sebi/CephfsMig/..., and the binary is now built from
./cmd/cephmig instead of the module root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-12-03 18:06:09 +01:00
1 parent 7705ed3eaf
commit 8fe60a4f8f
14 files changed
+16 -16

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
package main
import (
"bytes"
"context"
"strings"
"testing"
)
func TestCLIRejectsFinalizationWithoutWriterStop(t *testing.T) {
var out, log bytes.Buffer
err := run(context.Background(), []string{"finalize", "--config", "../../dev/migration.example.json", "--state", "/tmp/unused-state"}, &out, &log)
if err == nil || !strings.Contains(err.Error(), "--writers-stopped") {
t.Fatalf("got %v", err)
}
}
func TestCLIUsage(t *testing.T) {
var out, log bytes.Buffer
if err := run(context.Background(), []string{"--help"}, &out, &log); err != nil {
t.Fatal(err)
}
if !strings.Contains(out.String(), "finalize") {
t.Fatal("help missing")
}
for _, args := range [][]string{nil, {"unknown"}, {"sync"}, {"status"}, {"sync", "--config", "x", "extra"}} {
if err := run(context.Background(), args, &out, &log); err == nil {
t.Fatalf("accepted %v", args)
}
}
}