Skip to content

Commit

Permalink
Adding tests and fixing build script
Browse files Browse the repository at this point in the history
  • Loading branch information
jbogard committed Nov 22, 2022
1 parent dbcbcc7 commit 567d6ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exec { & dotnet clean -c Release }

exec { & dotnet build -c Release }

exec { & dotnet test -c Release -r $artifacts --no-build -l trx --verbosity=normal }
exec { & dotnet test -c Release --no-build -l trx --verbosity=normal }

exec { & dotnet pack .\src\MongoDB.Driver.Core.Extensions.DiagnosticSources\MongoDB.Driver.Core.Extensions.DiagnosticSources.csproj -c Release -o $artifacts --include-symbols -p:SymbolPackageFormat=snupkg --no-build }

Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public void Should_start_and_log_successful_activity()
{
activity.ShouldNotBeNull();
activity.OperationName.ShouldBe(DiagnosticsActivityEventSubscriber.ActivityName);
activity.Status.ShouldBe(ActivityStatusCode.Ok);
stopFired = true;
}
};
Expand Down Expand Up @@ -137,6 +138,7 @@ public void Should_start_and_log_failed_activity()
var statusTag = activity.Tags.SingleOrDefault(t => t.Key == "otel.status_code");
statusTag.ShouldNotBe(default);
statusTag.Value.ShouldBe("ERROR");
activity.Status.ShouldBe(ActivityStatusCode.Error);
exceptionFired = true;
}
};
Expand Down

0 comments on commit 567d6ba

Please sign in to comment.