feat: 完整游戏运维功能
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -76,6 +77,11 @@ func TestCoreServiceArtifactTransferWorkflow(t *testing.T) {
|
||||
if artifact.State != domain.ArtifactStateAvailable || artifact.Checksum != validator.BytesChecksum(payload) {
|
||||
t.Fatalf("expected available artifact, got %+v", artifact)
|
||||
}
|
||||
delete(svc.artifactTransfers, opened.TransferID)
|
||||
storedPayload, err := svc.artifactPayload("artifact-1")
|
||||
if err != nil || !bytes.Equal(storedPayload, payload) {
|
||||
t.Fatalf("expected completed upload payload to remain downloadable, payload=%q err=%v", storedPayload, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCoreServiceRejectsInvalidArtifactTransferChunks(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user