Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
ca68839b
"...internal/handler/git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "3b7a5fff3123ce7b82cf24aa633f7d6194c4d267"
Commit
ca68839b
authored
Apr 23, 2026
by
KnowSky404
Committed by
陈曦
Apr 27, 2026
Browse files
test: fix OpenAI account test helper calls after rebase
parent
cfc94a1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/account_test_service_openai_test.go
View file @
ca68839b
...
@@ -180,7 +180,7 @@ func TestAccountTestService_OpenAI429BodyOnlyPersistsRateLimitAndClearsStaleErro
...
@@ -180,7 +180,7 @@ func TestAccountTestService_OpenAI429BodyOnlyPersistsRateLimitAndClearsStaleErro
Credentials
:
map
[
string
]
any
{
"access_token"
:
"test-token"
},
Credentials
:
map
[
string
]
any
{
"access_token"
:
"test-token"
},
}
}
err
:=
svc
.
testOpenAIAccountConnection
(
ctx
,
account
,
"gpt-5.4"
)
err
:=
svc
.
testOpenAIAccountConnection
(
ctx
,
account
,
"gpt-5.4"
,
""
)
require
.
Error
(
t
,
err
)
require
.
Error
(
t
,
err
)
require
.
Equal
(
t
,
account
.
ID
,
repo
.
rateLimitedID
)
require
.
Equal
(
t
,
account
.
ID
,
repo
.
rateLimitedID
)
require
.
NotNil
(
t
,
repo
.
rateLimitedAt
)
require
.
NotNil
(
t
,
repo
.
rateLimitedAt
)
...
@@ -209,7 +209,7 @@ func TestAccountTestService_OpenAI429ActiveAccountDoesNotClearError(t *testing.T
...
@@ -209,7 +209,7 @@ func TestAccountTestService_OpenAI429ActiveAccountDoesNotClearError(t *testing.T
Credentials
:
map
[
string
]
any
{
"access_token"
:
"test-token"
},
Credentials
:
map
[
string
]
any
{
"access_token"
:
"test-token"
},
}
}
err
:=
svc
.
testOpenAIAccountConnection
(
ctx
,
account
,
"gpt-5.4"
)
err
:=
svc
.
testOpenAIAccountConnection
(
ctx
,
account
,
"gpt-5.4"
,
""
)
require
.
Error
(
t
,
err
)
require
.
Error
(
t
,
err
)
require
.
Equal
(
t
,
account
.
ID
,
repo
.
rateLimitedID
)
require
.
Equal
(
t
,
account
.
ID
,
repo
.
rateLimitedID
)
require
.
NotNil
(
t
,
repo
.
rateLimitedAt
)
require
.
NotNil
(
t
,
repo
.
rateLimitedAt
)
...
@@ -237,7 +237,7 @@ func TestAccountTestService_OpenAI429WithoutResetSignalDoesNotMutateRuntimeState
...
@@ -237,7 +237,7 @@ func TestAccountTestService_OpenAI429WithoutResetSignalDoesNotMutateRuntimeState
Credentials
:
map
[
string
]
any
{
"access_token"
:
"test-token"
},
Credentials
:
map
[
string
]
any
{
"access_token"
:
"test-token"
},
}
}
err
:=
svc
.
testOpenAIAccountConnection
(
ctx
,
account
,
"gpt-5.4"
)
err
:=
svc
.
testOpenAIAccountConnection
(
ctx
,
account
,
"gpt-5.4"
,
""
)
require
.
Error
(
t
,
err
)
require
.
Error
(
t
,
err
)
require
.
Zero
(
t
,
repo
.
rateLimitedID
)
require
.
Zero
(
t
,
repo
.
rateLimitedID
)
require
.
Nil
(
t
,
repo
.
rateLimitedAt
)
require
.
Nil
(
t
,
repo
.
rateLimitedAt
)
...
@@ -265,7 +265,7 @@ func TestAccountTestService_OpenAI401SetsPermanentErrorOnly(t *testing.T) {
...
@@ -265,7 +265,7 @@ func TestAccountTestService_OpenAI401SetsPermanentErrorOnly(t *testing.T) {
Credentials
:
map
[
string
]
any
{
"access_token"
:
"test-token"
},
Credentials
:
map
[
string
]
any
{
"access_token"
:
"test-token"
},
}
}
err
:=
svc
.
testOpenAIAccountConnection
(
ctx
,
account
,
"gpt-5.4"
)
err
:=
svc
.
testOpenAIAccountConnection
(
ctx
,
account
,
"gpt-5.4"
,
""
)
require
.
Error
(
t
,
err
)
require
.
Error
(
t
,
err
)
require
.
Equal
(
t
,
account
.
ID
,
repo
.
setErrorID
)
require
.
Equal
(
t
,
account
.
ID
,
repo
.
setErrorID
)
require
.
Contains
(
t
,
repo
.
setErrorMsg
,
"Authentication failed (401)"
)
require
.
Contains
(
t
,
repo
.
setErrorMsg
,
"Authentication failed (401)"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment