feat(cli): add v2 batch import command
This commit is contained in:
@@ -32,7 +32,7 @@ func TestExecuteWritesConfigSummaryAfterBootstrap(t *testing.T) {
|
||||
SQLiteDSN: "file:test.db?_foreign_keys=on",
|
||||
},
|
||||
}, nil
|
||||
}, nil, nil, nil, nil, nil)
|
||||
}, nil, nil, nil, nil, nil, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("execute() returned error: %v", err)
|
||||
}
|
||||
@@ -60,7 +60,7 @@ func TestExecuteReturnsBootstrapError(t *testing.T) {
|
||||
|
||||
err := execute(context.Background(), &bytes.Buffer{}, nil, func(context.Context) (config.StartupConfig, error) {
|
||||
return config.StartupConfig{}, wantErr
|
||||
}, nil, nil, nil, nil, nil)
|
||||
}, nil, nil, nil, nil, nil, nil)
|
||||
if !errors.Is(err, wantErr) {
|
||||
t.Fatalf("execute() error = %v, want %v", err, wantErr)
|
||||
}
|
||||
@@ -74,7 +74,7 @@ func TestExecuteReturnsWriteError(t *testing.T) {
|
||||
Server: config.ServerConfig{ListenAddr: ":9292"},
|
||||
Database: config.DatabaseConfig{SQLiteDSN: "file:test.db"},
|
||||
}, nil
|
||||
}, nil, nil, nil, nil, nil)
|
||||
}, nil, nil, nil, nil, nil, nil)
|
||||
if !errors.Is(err, wantErr) {
|
||||
t.Fatalf("execute() error = %v, want %v", err, wantErr)
|
||||
}
|
||||
@@ -98,7 +98,7 @@ func TestExecuteInstallPackWritesSummary(t *testing.T) {
|
||||
HostVersion: "0.1.126",
|
||||
Providers: []sqlite.Provider{{ProviderID: "deepseek"}},
|
||||
}, nil
|
||||
}, nil, nil, nil, nil)
|
||||
}, nil, nil, nil, nil, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("execute() install-pack error = %v", err)
|
||||
}
|
||||
@@ -133,7 +133,7 @@ func TestExecuteImportProviderWritesSummary(t *testing.T) {
|
||||
AccessStatus: provision.AccessStatusSelfServiceReady,
|
||||
Accounts: []provision.AccountImportResult{{}, {}},
|
||||
}, nil
|
||||
}, nil, nil, nil)
|
||||
}, nil, nil, nil, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("execute() import error = %v", err)
|
||||
}
|
||||
@@ -170,7 +170,7 @@ func TestExecutePreviewProviderWritesSummary(t *testing.T) {
|
||||
"plan": {Action: provision.PreviewActionConflict},
|
||||
},
|
||||
}, nil
|
||||
}, nil, nil)
|
||||
}, nil, nil, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("execute() preview error = %v", err)
|
||||
}
|
||||
@@ -198,7 +198,7 @@ func TestExecuteRollbackProviderWritesSummary(t *testing.T) {
|
||||
t.Fatalf("unexpected rollback request: %+v", req)
|
||||
}
|
||||
return rollbackSummary{Accounts: 2, Plans: 1, Channels: 1, Groups: 1}, nil
|
||||
}, nil)
|
||||
}, nil, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("execute() rollback error = %v", err)
|
||||
}
|
||||
@@ -227,7 +227,7 @@ func TestExecuteReconcileProviderWritesSummary(t *testing.T) {
|
||||
t.Fatalf("unexpected reconcile request: %+v", req)
|
||||
}
|
||||
return provision.ReconcileResult{Status: "drifted", MissingCount: 1, ExtraCount: 2, ProbeFailureCount: 1, AccessStatus: provision.AccessStatusBroken}, nil
|
||||
})
|
||||
}, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("execute() reconcile error = %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user