开发检查点:收尾项目生命周期并接入资源读取隔离,待统一测试
This commit is contained in:
1 parent
fd767b23c3
commit
709c1ef063
27 files changed
+785
-68
No files matched your search
@@ -22,6 +22,19 @@ func TestNewProject(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidProjectID(t *testing.T) {
|
||||
for _, id := range []string{DefaultProjectID, "a", "1", "project_a-1", strings.Repeat("a", 36)} {
|
||||
if !ValidProjectID(id) {
|
||||
t.Fatalf("拒绝合法项目标识:%q", id)
|
||||
}
|
||||
}
|
||||
for _, id := range []string{"", "UPPERCASE", strings.Repeat("a", 37), " project", "project ", "_project", "../project", "项目"} {
|
||||
if ValidProjectID(id) {
|
||||
t.Fatalf("接受无效项目标识:%q", id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestProjectValidation(t *testing.T) {
|
||||
cases := []struct {
|
||||
name string
|
||||
|
||||
Reference in new issue
Block a user