@@ -83,22 +83,22 @@ func TestTracedDA_Submit_Success(t *testing.T) {
8383 spans := sr .Ended ()
8484 require .Len (t , spans , 1 )
8585 span := spans [0 ]
86- require .Equal (t , "DA.Submit" , span .Name ())
86+ require .Equal (t , "DA.Submit" , span .Name ())
8787 require .Equal (t , codes .Unset , span .Status ().Code )
8888
89- attrs := span .Attributes ()
90- requireAttribute (t , attrs , "blob.count" , 2 )
91- requireAttribute (t , attrs , "blob.total_size_bytes" , 3 )
92- // namespace length assertion for local behavior
93- // look for da.namespace and assert byte-length
94- foundNS := false
95- for _ , a := range attrs {
96- if string (a .Key ) == "da.namespace" {
97- foundNS = true
98- require .Equal (t , 2 , len (a .Value .AsString ()))
99- }
100- }
101- require .True (t , foundNS , "attribute da.namespace not found" )
89+ attrs := span .Attributes ()
90+ requireAttribute (t , attrs , "blob.count" , 2 )
91+ requireAttribute (t , attrs , "blob.total_size_bytes" , 3 )
92+ // namespace hex string length assertion
93+ // 2 bytes = 4 hex characters
94+ foundNS := false
95+ for _ , a := range attrs {
96+ if string (a .Key ) == "da.namespace" {
97+ foundNS = true
98+ require .Equal (t , 4 , len (a .Value .AsString ()))
99+ }
100+ }
101+ require .True (t , foundNS , "attribute da.namespace not found" )
102102}
103103
104104func TestTracedDA_Submit_Error (t * testing.T ) {
@@ -132,10 +132,10 @@ func TestTracedDA_Retrieve_Success(t *testing.T) {
132132 spans := sr .Ended ()
133133 require .Len (t , spans , 1 )
134134 span := spans [0 ]
135- require .Equal (t , "DA.Retrieve" , span .Name ())
136- attrs := span .Attributes ()
137- requireAttribute (t , attrs , "ns.length" , 1 )
138- requireAttribute (t , attrs , "blob.count" , 2 )
135+ require .Equal (t , "DA.Retrieve" , span .Name ())
136+ attrs := span .Attributes ()
137+ requireAttribute (t , attrs , "ns.length" , 1 )
138+ requireAttribute (t , attrs , "blob.count" , 2 )
139139}
140140
141141func TestTracedDA_Retrieve_Error (t * testing.T ) {
@@ -172,7 +172,7 @@ func TestTracedDA_Get_Success(t *testing.T) {
172172 spans := sr .Ended ()
173173 require .Len (t , spans , 1 )
174174 span := spans [0 ]
175- require .Equal (t , "DA.Get" , span .Name ())
175+ require .Equal (t , "DA.Get" , span .Name ())
176176 attrs := span .Attributes ()
177177 requireAttribute (t , attrs , "id.count" , 2 )
178178 requireAttribute (t , attrs , "blob.count" , 2 )
0 commit comments