mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-05 22:03:06 +00:00
test: Complete admin skill sync status fixtures
This commit is contained in:
parent
6689ab3625
commit
943a8ff17b
1 changed files with 22 additions and 6 deletions
|
|
@ -20,10 +20,10 @@ function createHandlers() {
|
|||
runOnStartup: false,
|
||||
sources: [
|
||||
{
|
||||
provider: 'github',
|
||||
provider: 'github' as const,
|
||||
sourceId: 'tenant-skills',
|
||||
tenantId: 'tenant-a',
|
||||
status: 'idle',
|
||||
status: 'idle' as const,
|
||||
credentialKey: 'github-skills-prod',
|
||||
credentialPresent: true,
|
||||
owner: 'LibreChat',
|
||||
|
|
@ -34,11 +34,19 @@ function createHandlers() {
|
|||
syncedFileCount: 0,
|
||||
deletedSkillCount: 0,
|
||||
deletedFileCount: 0,
|
||||
errorCode: undefined,
|
||||
errorMessage: undefined,
|
||||
startedAt: undefined,
|
||||
finishedAt: undefined,
|
||||
lastSuccessAt: undefined,
|
||||
lastFailureAt: undefined,
|
||||
createdAt: undefined,
|
||||
updatedAt: undefined,
|
||||
},
|
||||
],
|
||||
credentials: [
|
||||
{
|
||||
provider: 'github',
|
||||
provider: 'github' as const,
|
||||
credentialKey: 'github-skills-prod',
|
||||
credentialPresent: true,
|
||||
tokenFingerprint: 'abc123',
|
||||
|
|
@ -47,19 +55,27 @@ function createHandlers() {
|
|||
fineGrainedTokenRecommendation: 'Use a fine-grained token.',
|
||||
})),
|
||||
runOnce: jest.fn(async () => ({
|
||||
status: 'completed',
|
||||
status: 'completed' as const,
|
||||
sources: [
|
||||
{
|
||||
provider: 'github',
|
||||
provider: 'github' as const,
|
||||
sourceId: 'tenant-skills',
|
||||
tenantId: 'tenant-a',
|
||||
status: 'succeeded',
|
||||
status: 'succeeded' as const,
|
||||
credentialKey: 'github-skills-prod',
|
||||
credentialPresent: true,
|
||||
syncedSkillCount: 1,
|
||||
syncedFileCount: 2,
|
||||
deletedSkillCount: 0,
|
||||
deletedFileCount: 0,
|
||||
errorCode: undefined,
|
||||
errorMessage: undefined,
|
||||
startedAt: undefined,
|
||||
finishedAt: undefined,
|
||||
lastSuccessAt: undefined,
|
||||
lastFailureAt: undefined,
|
||||
createdAt: undefined,
|
||||
updatedAt: undefined,
|
||||
},
|
||||
],
|
||||
})),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue