docs: annotate Foundry source and deployment lifecycle in Chinese [skip ci]
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// 认证回归:数据库用例需要 PLATFORM_TEST_DATABASE_URL 指向隔离且已迁移的 fixture。
|
||||
package auth
|
||||
|
||||
import (
|
||||
@@ -12,6 +13,7 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestConcurrentRegistrationAndVerification 并发重发注册与消费原验证链接,允许任一先取得邮箱锁;最终只能留下一个凭据或一个待验证记录。
|
||||
func TestConcurrentRegistrationAndVerification(t *testing.T) {
|
||||
dsn := os.Getenv("PLATFORM_TEST_DATABASE_URL")
|
||||
if dsn == "" {
|
||||
@@ -45,6 +47,7 @@ func TestConcurrentRegistrationAndVerification(t *testing.T) {
|
||||
if len(match) != 2 {
|
||||
t.Fatal("missing verification link")
|
||||
}
|
||||
// 缓冲通道收集两条 goroutine 的结果;这里断言最终数据库一致性,不规定抢锁顺序。
|
||||
done := make(chan error, 2)
|
||||
go func() {
|
||||
r := httptest.NewRequest("POST", "https://api.example.com/register", nil)
|
||||
|
||||
Reference in New Issue
Block a user