修复部署恢复前证据核验并补齐原生负向回归
This commit is contained in:
1 parent
9a3ef1711f
commit
46a9fa0006
14 files changed
+538
-15
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -11,6 +12,7 @@ import (
|
||||
|
||||
func TestProjectAuditReaderScopesLogsAndHonorsRevocation(t *testing.T) {
|
||||
cfg := config.Default(t.TempDir()).Database
|
||||
cfg.DSN = filepath.Join(t.TempDir(), "project-audit.db")
|
||||
db, err := database.Open(t.Context(), cfg)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -3,6 +3,7 @@ package repository
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"git.pcux.cn/xuans/Scert/backend/internal/config"
|
||||
@@ -12,7 +13,9 @@ import (
|
||||
)
|
||||
|
||||
func TestProjectDirectorySQLite(t *testing.T) {
|
||||
checkProjectDirectory(t, config.Default(t.TempDir()).Database)
|
||||
cfg := config.Default(t.TempDir()).Database
|
||||
cfg.DSN = filepath.Join(t.TempDir(), "project-directory.db")
|
||||
checkProjectDirectory(t, cfg)
|
||||
}
|
||||
|
||||
func TestProjectDirectoryMySQLReal(t *testing.T) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"git.pcux.cn/xuans/Scert/backend/internal/config"
|
||||
@@ -14,6 +15,7 @@ import (
|
||||
|
||||
func TestProjectDomainRepositorySQLite(t *testing.T) {
|
||||
cfg := config.Default(t.TempDir()).Database
|
||||
cfg.DSN = filepath.Join(t.TempDir(), "project-domains.db")
|
||||
db, err := database.Open(t.Context(), cfg)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -264,6 +264,7 @@ func TestProjectLifecycleSQLiteAuditRollback(t *testing.T) {
|
||||
for _, mode := range []string{"ABORT, 'audit-failure'", "IGNORE"} {
|
||||
t.Run(action+mode, func(t *testing.T) {
|
||||
cfg := config.Default(t.TempDir()).Database
|
||||
cfg.DSN = filepath.Join(t.TempDir(), "project-audit-rollback.db")
|
||||
db, err := database.Open(t.Context(), cfg)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"git.pcux.cn/xuans/Scert/backend/internal/config"
|
||||
@@ -13,7 +14,9 @@ import (
|
||||
)
|
||||
|
||||
func TestProjectMemberListingSQLite(t *testing.T) {
|
||||
checkProjectMemberListing(t, config.Default(t.TempDir()).Database)
|
||||
cfg := config.Default(t.TempDir()).Database
|
||||
cfg.DSN = filepath.Join(t.TempDir(), "project-members.db")
|
||||
checkProjectMemberListing(t, cfg)
|
||||
}
|
||||
|
||||
func TestProjectMemberListingMySQLReal(t *testing.T) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"git.pcux.cn/xuans/Scert/backend/internal/config"
|
||||
@@ -14,7 +15,9 @@ import (
|
||||
)
|
||||
|
||||
func TestProjectResourcesSQLite(t *testing.T) {
|
||||
checkProjectResources(t, config.Default(t.TempDir()).Database, nil)
|
||||
cfg := config.Default(t.TempDir()).Database
|
||||
cfg.DSN = filepath.Join(t.TempDir(), "project-resources.db")
|
||||
checkProjectResources(t, cfg, nil)
|
||||
}
|
||||
|
||||
func TestProjectResourcesMySQLReal(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user