File tree 1 file changed +6
-60
lines changed
opentelemetry-sdk/src/logs
1 file changed +6
-60
lines changed Original file line number Diff line number Diff line change @@ -79,66 +79,12 @@ mod tests {
79
79
. clone ( )
80
80
. expect ( "Attributes are expected" ) ;
81
81
assert_eq ! ( attributes. len( ) , 10 ) ;
82
- assert ! ( log
83
- . record
84
- . attributes
85
- . clone( )
86
- . unwrap( )
87
- . contains( & ( Key :: new( "key1" ) , AnyValue :: String ( "value1" . into( ) ) ) ) ) ;
88
- assert ! ( log
89
- . record
90
- . attributes
91
- . clone( )
92
- . unwrap( )
93
- . contains( & ( Key :: new( "key2" ) , AnyValue :: String ( "value2" . into( ) ) ) ) ) ;
94
- assert ! ( log
95
- . record
96
- . attributes
97
- . clone( )
98
- . unwrap( )
99
- . contains( & ( Key :: new( "key3" ) , AnyValue :: String ( "value3" . into( ) ) ) ) ) ;
100
- assert ! ( log
101
- . record
102
- . attributes
103
- . clone( )
104
- . unwrap( )
105
- . contains( & ( Key :: new( "key4" ) , AnyValue :: String ( "value4" . into( ) ) ) ) ) ;
106
- assert ! ( log
107
- . record
108
- . attributes
109
- . clone( )
110
- . unwrap( )
111
- . contains( & ( Key :: new( "key5" ) , AnyValue :: String ( "value5" . into( ) ) ) ) ) ;
112
- assert ! ( log
113
- . record
114
- . attributes
115
- . clone( )
116
- . unwrap( )
117
- . contains( & ( Key :: new( "key6" ) , AnyValue :: String ( "value6" . into( ) ) ) ) ) ;
118
- assert ! ( log
119
- . record
120
- . attributes
121
- . clone( )
122
- . unwrap( )
123
- . contains( & ( Key :: new( "key7" ) , AnyValue :: String ( "value7" . into( ) ) ) ) ) ;
124
- assert ! ( log
125
- . record
126
- . attributes
127
- . clone( )
128
- . unwrap( )
129
- . contains( & ( Key :: new( "key8" ) , AnyValue :: String ( "value8" . into( ) ) ) ) ) ;
130
- assert ! ( log
131
- . record
132
- . attributes
133
- . clone( )
134
- . unwrap( )
135
- . contains( & ( Key :: new( "key9" ) , AnyValue :: String ( "value9" . into( ) ) ) ) ) ;
136
- assert ! ( log
137
- . record
138
- . attributes
139
- . clone( )
140
- . unwrap( )
141
- . contains( & ( Key :: new( "key10" ) , AnyValue :: String ( "value10" . into( ) ) ) ) ) ;
82
+ for i in 1 ..=10 {
83
+ assert ! ( log. record. attributes. clone( ) . unwrap( ) . contains( & (
84
+ Key :: new( format!( "key{}" , i) ) ,
85
+ AnyValue :: String ( format!( "value{}" , i) . into( ) )
86
+ ) ) ) ;
87
+ }
142
88
}
143
89
144
90
#[ test]
You can’t perform that action at this time.
0 commit comments