File tree Expand file tree Collapse file tree 5 files changed +4
-83
lines changed
test/OpenTelemetry.Shims.OpenTracing.Tests Expand file tree Collapse file tree 5 files changed +4
-83
lines changed Original file line number Diff line number Diff line change 110110 <PackageVersion Include =" Microsoft.NETFramework.ReferenceAssemblies" Version =" 1.0.3" />
111111 <PackageVersion Include =" Microsoft.NET.Test.Sdk" Version =" 18.0.1" />
112112 <PackageVersion Include =" MinVer" Version =" 6.0.0" />
113- <PackageVersion Include =" NuGet.Versioning" Version =" 6.14.0" />
114113 <PackageVersion Include =" OpenTelemetry.Instrumentation.AspNetCore" Version =" 1.13.0" />
115114 <PackageVersion Include =" OpenTelemetry.Instrumentation.GrpcNetClient" Version =" 1.13.0-beta.1" />
116115 <PackageVersion Include =" OpenTelemetry.Instrumentation.Http" Version =" 1.13.0" />
Original file line number Diff line number Diff line change 33 <PropertyGroup >
44 <Description >Unit test project for OpenTelemetry.Shims.OpenTracing</Description >
55 <TargetFrameworks >$(TargetFrameworksForTests)</TargetFrameworks >
6- <DefineConstants Condition =" '$(RunningDotNetPack)' != 'true'" >$(DefineConstants);BUILDING_USING_PROJECTS</DefineConstants >
76 </PropertyGroup >
87
9- <ItemGroup >
10- <PackageReference Include =" NuGet.Versioning" />
11- </ItemGroup >
12-
138 <ItemGroup >
149 <ProjectReference Include =" $(RepoRoot)\src\OpenTelemetry.Shims.OpenTracing\OpenTelemetry.Shims.OpenTracing.csproj" />
1510 </ItemGroup >
Original file line number Diff line number Diff line change @@ -228,15 +228,7 @@ public void WithTag_KeyIsErrorStringValue()
228228 Assert . NotNull ( spanShim . Span . Activity ) ;
229229 Assert . Equal ( "ERROR" , spanShim . Span . Activity . GetTagValue ( SpanAttributeConstants . StatusCodeKey ) ) ;
230230
231- if ( VersionHelper . IsApiVersionGreaterThanOrEqualTo ( 1 , 10 ) )
232- {
233- // Activity status code should also be set
234- Assert . Equal ( ActivityStatusCode . Error , spanShim . Span . Activity . Status ) ;
235- }
236- else
237- {
238- Assert . Equal ( ActivityStatusCode . Unset , spanShim . Span . Activity . Status ) ;
239- }
231+ Assert . Equal ( ActivityStatusCode . Error , spanShim . Span . Activity . Status ) ;
240232 }
241233
242234 [ Fact ]
@@ -285,15 +277,7 @@ public void WithTag_KeyIsErrorBoolValue()
285277 // Legacy span status tag should be set
286278 Assert . NotNull ( spanShim . Span . Activity ) ;
287279 Assert . Equal ( "ERROR" , spanShim . Span . Activity . GetTagValue ( SpanAttributeConstants . StatusCodeKey ) ) ;
288- if ( VersionHelper . IsApiVersionGreaterThanOrEqualTo ( 1 , 10 ) )
289- {
290- // Activity status code should also be set
291- Assert . Equal ( ActivityStatusCode . Error , spanShim . Span . Activity . Status ) ;
292- }
293- else
294- {
295- Assert . Equal ( ActivityStatusCode . Unset , spanShim . Span . Activity . Status ) ;
296- }
280+ Assert . Equal ( ActivityStatusCode . Error , spanShim . Span . Activity . Status ) ;
297281 }
298282
299283 [ Fact ]
Original file line number Diff line number Diff line change @@ -220,31 +220,14 @@ public void SetTagBoolValue()
220220
221221 // Legacy span status tag should be set
222222 Assert . Equal ( "ERROR" , shim . Span . Activity . GetTagValue ( SpanAttributeConstants . StatusCodeKey ) ) ;
223-
224- if ( VersionHelper . IsApiVersionGreaterThanOrEqualTo ( 1 , 10 ) )
225- {
226- // Activity status code should also be set
227- Assert . Equal ( ActivityStatusCode . Error , shim . Span . Activity . Status ) ;
228- }
229- else
230- {
231- Assert . Equal ( ActivityStatusCode . Unset , shim . Span . Activity . Status ) ;
232- }
223+ Assert . Equal ( ActivityStatusCode . Error , shim . Span . Activity . Status ) ;
233224
234225 shim . SetTag ( Tags . Error . Key , false ) ;
235226
236227 // Legacy span status tag should be set
237228 Assert . Equal ( "OK" , shim . Span . Activity . GetTagValue ( SpanAttributeConstants . StatusCodeKey ) ) ;
238229
239- if ( VersionHelper . IsApiVersionGreaterThanOrEqualTo ( 1 , 10 ) )
240- {
241- // Activity status code should also be set
242- Assert . Equal ( ActivityStatusCode . Ok , shim . Span . Activity . Status ) ;
243- }
244- else
245- {
246- Assert . Equal ( ActivityStatusCode . Unset , shim . Span . Activity . Status ) ;
247- }
230+ Assert . Equal ( ActivityStatusCode . Ok , shim . Span . Activity . Status ) ;
248231 }
249232
250233 [ Fact ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments