feat(auth): implement user and device authentication

This commit is contained in:
QiuSW
2026-07-26 15:18:48 +08:00
parent c5d3b215ff
commit 49db5b8305
66 changed files with 6216 additions and 271 deletions
@@ -27,12 +27,13 @@ func TestRunnerSupportsUpStatusDownAndIdempotentUp(t *testing.T) {
if err != nil {
t.Fatalf("Up() error = %v", err)
}
if applied != 2 {
t.Fatalf("Up() applied = %d, want 2", applied)
if applied != 3 {
t.Fatalf("Up() applied = %d, want 3", applied)
}
assertStatuses(t, runner, map[int64]bool{
1: true,
2: true,
3: true,
})
applied, err = runner.Up(context.Background())
@@ -48,7 +49,8 @@ func TestRunnerSupportsUpStatusDownAndIdempotentUp(t *testing.T) {
}
assertStatuses(t, runner, map[int64]bool{
1: true,
2: false,
2: true,
3: false,
})
applied, err = runner.Up(context.Background())
@@ -61,6 +63,7 @@ func TestRunnerSupportsUpStatusDownAndIdempotentUp(t *testing.T) {
assertStatuses(t, runner, map[int64]bool{
1: true,
2: true,
3: true,
})
}