fix(osi): 加固 Phase 0 验收实现(T-006)
This commit is contained in:
@@ -3,7 +3,6 @@ package contract
|
||||
type Envelope struct {
|
||||
ServiceID string `json:"serviceId"`
|
||||
UploadInfo any `json:"uploadinfo,omitempty"`
|
||||
BaseInfo any `json:"baseInfo,omitempty"`
|
||||
}
|
||||
|
||||
type UploadInfo struct {
|
||||
|
||||
@@ -2,6 +2,7 @@ package contract
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -27,3 +28,9 @@ func TestEnvelopeUsesUploadInfoWithBaseAndManageInfo(t *testing.T) {
|
||||
t.Fatalf("envelope JSON = %s", raw)
|
||||
}
|
||||
}
|
||||
|
||||
func TestEnvelopeDoesNotExposeTopLevelBaseInfo(t *testing.T) {
|
||||
if _, ok := reflect.TypeOf(Envelope{}).FieldByName("BaseInfo"); ok {
|
||||
t.Fatal("Envelope exposes obsolete top-level BaseInfo")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user