feat(t226): add Go ERP session login
This commit is contained in:
@@ -137,10 +137,12 @@ func TestBuildRouterRegistersProtectedLogoutRoute(t *testing.T) {
|
||||
t.Fatalf("migration.Up() error = %v", err)
|
||||
}
|
||||
router, err := buildRouter(ctx, config.Config{
|
||||
AssetDirectory: filepath.Join(t.TempDir(), "assets"),
|
||||
ClaimLease: 10 * time.Minute,
|
||||
RunningLease: 30 * time.Minute,
|
||||
ReadinessTTL: 2 * time.Minute,
|
||||
AssetDirectory: filepath.Join(t.TempDir(), "assets"),
|
||||
ClaimLease: 10 * time.Minute,
|
||||
RunningLease: 30 * time.Minute,
|
||||
ReadinessTTL: 2 * time.Minute,
|
||||
ShunyunbaoURL: "https://www.shunyunbaoerp.com",
|
||||
ShunyunbaoTimeout: 30 * time.Second,
|
||||
}, db)
|
||||
if err != nil {
|
||||
t.Fatalf("buildRouter() error = %v", err)
|
||||
@@ -159,7 +161,7 @@ func TestBuildRouterRegistersProtectedLogoutRoute(t *testing.T) {
|
||||
response.Header().Get("Location"),
|
||||
)
|
||||
}
|
||||
for _, target := range []string{"/freight", "/freight/import"} {
|
||||
for _, target := range []string{"/freight", "/freight/import", "/erp"} {
|
||||
request = httptest.NewRequest(http.MethodGet, target, nil)
|
||||
response = httptest.NewRecorder()
|
||||
router.ServeHTTP(response, request)
|
||||
|
||||
Reference in New Issue
Block a user