88 "github.com/stretchr/testify/require"
99)
1010
11- func TestOverlyLongMetadataTruncation (t * testing.T ) {
11+ func TestDXOverlyLongMetadataTruncation (t * testing.T ) {
1212 metadata := map [string ]any {
1313 "to_truncate" : "abcde" + strings .Repeat ("1234567890" , 110 ), // overly long
1414 "note" : "keep this short" ,
@@ -27,7 +27,7 @@ func TestOverlyLongMetadataTruncation(t *testing.T) {
2727 require .NotEqual (t , metadata ["to_truncate" ], truncated ["to_truncate" ], "to_truncate should be truncated" )
2828}
2929
30- func TestOnlyOneOveryLongMetadataTruncationNoPriority (t * testing.T ) {
30+ func TestDXOnlyOneOveryLongMetadataTruncationNoPriority (t * testing.T ) {
3131 metadata := map [string ]any {
3232 "to_truncate" : "abcde" + strings .Repeat ("1234567890" , 110 ), // overly long
3333 "do_not_truncate" : "abcde" + strings .Repeat ("1234567890" , 50 ),
@@ -48,7 +48,7 @@ func TestOnlyOneOveryLongMetadataTruncationNoPriority(t *testing.T) {
4848 require .Equal (t , metadata ["do_not_truncate" ], truncated ["do_not_truncate" ], "do_not_truncate should not be truncated" )
4949}
5050
51- func TestyOneOveryLongMetadataTruncationNonExistingPriority (t * testing.T ) {
51+ func TestDXOneOveryLongMetadataTruncationNonExistingPriority (t * testing.T ) {
5252 metadata := map [string ]any {
5353 "to_truncate" : "abcde" + strings .Repeat ("1234567890" , 110 ), // overly long
5454 "do_not_truncate" : "abcde" + strings .Repeat ("1234567890" , 50 ),
@@ -69,7 +69,7 @@ func TestyOneOveryLongMetadataTruncationNonExistingPriority(t *testing.T) {
6969 require .Equal (t , metadata ["do_not_truncate" ], truncated ["do_not_truncate" ], "do_not_truncate should not be truncated" )
7070}
7171
72- func TestTogetherOveryLongMetadataTruncationNoPriority (t * testing.T ) {
72+ func TestDXTogetherOveryLongMetadataTruncationNoPriority (t * testing.T ) {
7373 metadata := map [string ]any {
7474 "to_truncate" : "abcde" + strings .Repeat ("1234567890" , 60 ), // together both fields are overly long and one of them has to be truncated
7575 "do_not_truncate" : "abcde" + strings .Repeat ("1234567890" , 60 ),
@@ -98,7 +98,7 @@ func TestTogetherOveryLongMetadataTruncationNoPriority(t *testing.T) {
9898 require .Len (t , truncatedFields , 1 , "only one field should be truncated" )
9999}
100100
101- func TestNoTruncation (t * testing.T ) {
101+ func TestDXNoTruncation (t * testing.T ) {
102102 // exactly 1024 bytes
103103 metadata := map [string ]any {
104104 "all_good" : "abcde" + strings .Repeat ("x" , 951 ),
@@ -118,7 +118,7 @@ func TestNoTruncation(t *testing.T) {
118118 require .Equal (t , metadata ["all_good" ], truncated ["all_good" ], "all_good should not be truncated" )
119119}
120120
121- func TestNoTruncationAndNoPriority (t * testing.T ) {
121+ func TestDXNoTruncationAndNoPriority (t * testing.T ) {
122122 // exactly 1024 bytes
123123 metadata := map [string ]any {
124124 "all_good" : "abcde" + strings .Repeat ("x" , 951 ),
@@ -138,7 +138,7 @@ func TestNoTruncationAndNoPriority(t *testing.T) {
138138 require .Equal (t , metadata ["all_good" ], truncated ["all_good" ], "all_good should not be truncated" )
139139}
140140
141- func TestEmptyMetadata (t * testing.T ) {
141+ func TestDXEmptyMetadata (t * testing.T ) {
142142 metadata := map [string ]any {}
143143
144144 truncated , truncateErr := truncateMetadata (metadata , []string {"nonexistent" })
@@ -151,7 +151,7 @@ func TestEmptyMetadata(t *testing.T) {
151151 require .Len (t , metadata , len (truncated ), "empty metadata should remain empty" )
152152}
153153
154- func TestNonStringValuesOnly (t * testing.T ) {
154+ func TestDXNonStringValuesOnly (t * testing.T ) {
155155 metadata := map [string ]any {
156156 "number" : 12345 ,
157157 "boolean" : true ,
@@ -174,7 +174,7 @@ func TestNonStringValuesOnly(t *testing.T) {
174174 require .Equal (t , metadata ["null" ], truncated ["null" ], "null should not be truncated" )
175175}
176176
177- func TestMixedStringAndNonStringValues (t * testing.T ) {
177+ func TestDXMixedStringAndNonStringValues (t * testing.T ) {
178178 metadata := map [string ]any {
179179 "long_string" : "abcde" + strings .Repeat ("1234567890" , 100 ), // overly long
180180 "number" : 12345 ,
@@ -198,7 +198,7 @@ func TestMixedStringAndNonStringValues(t *testing.T) {
198198 require .Contains (t , truncated ["long_string" ].(string ), "(... truncated)" , "truncated string should have suffix" )
199199}
200200
201- func TestMixedStringAndNonStringValuesNoTruncation (t * testing.T ) {
201+ func TestDXMixedStringAndNonStringValuesNoTruncation (t * testing.T ) {
202202 metadata := map [string ]any {
203203 "not_long_string" : "abcde" + strings .Repeat ("1234567890" , 10 ), // overly long
204204 "number" : 12345 ,
@@ -222,7 +222,7 @@ func TestMixedStringAndNonStringValuesNoTruncation(t *testing.T) {
222222 require .Equal (t , metadata ["not_long_string" ], truncated ["not_long_string" ], "truncated string should have suffix" )
223223}
224224
225- func TestPriorityFieldsNeedTruncation (t * testing.T ) {
225+ func TestDXPriorityFieldsNeedTruncation (t * testing.T ) {
226226 metadata := map [string ]any {
227227 "priority1" : "abcde" + strings .Repeat ("1234567890" , 50 ), // long priority field
228228 "priority2" : "abcde" + strings .Repeat ("abcdefghij" , 50 ), // another long priority field
@@ -244,7 +244,7 @@ func TestPriorityFieldsNeedTruncation(t *testing.T) {
244244 require .Equal (t , metadata ["regular" ], truncated ["regular" ], "regular should not be truncated since priority fields are truncated first" )
245245}
246246
247- func TestEmptyStrings (t * testing.T ) {
247+ func TestDXEmptyStrings (t * testing.T ) {
248248 metadata := map [string ]any {
249249 "empty1" : "" ,
250250 "empty2" : "" ,
@@ -265,7 +265,7 @@ func TestEmptyStrings(t *testing.T) {
265265 require .NotEqual (t , metadata ["filled" ], truncated ["filled" ], "filled should be truncated" )
266266}
267267
268- func TestExtremelyLargeDataThatCannotFit (t * testing.T ) {
268+ func TestDXExtremelyLargeDataThatCannotFit (t * testing.T ) {
269269 // Create metadata so large that even after truncation it won't fit
270270 metadata := map [string ]any {
271271 "huge1" : "abcde" + strings .Repeat ("1234567890" , 200 ),
@@ -289,7 +289,7 @@ func TestExtremelyLargeDataThatCannotFit(t *testing.T) {
289289 }
290290}
291291
292- func TestPriorityFieldsDoNotExist (t * testing.T ) {
292+ func TestDXPriorityFieldsDoNotExist (t * testing.T ) {
293293 metadata := map [string ]any {
294294 "existing" : "abcde" + strings .Repeat ("1234567890" , 100 ), // overly long
295295 "short" : "short" ,
0 commit comments