Add projects
This commit is contained in:
parent
2d3a9ad623
commit
8b607dd700
1802 changed files with 503346 additions and 2 deletions
16
backend/sdk/cliproxy/auth/errors_compat_test.go
Normal file
16
backend/sdk/cliproxy/auth/errors_compat_test.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package auth_test
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
cliproxyauth "github.com/router-for-me/CLIProxyAPI/v7/sdk/cliproxy/auth"
|
||||
)
|
||||
|
||||
func TestErrorLegacyUnkeyedLiteralCompatibility(t *testing.T) {
|
||||
err := cliproxyauth.Error{"code", "message", false, http.StatusRequestTimeout}
|
||||
|
||||
if err.Code != "code" || err.Message != "message" || err.Retryable || err.HTTPStatus != http.StatusRequestTimeout {
|
||||
t.Fatalf("unexpected error fields: %#v", err)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue