Skip to content

Commit

Permalink
fix: Update token handling in SpiceDbClientTests
Browse files Browse the repository at this point in the history
Modified the way tokens are handled in SpiceDbClientTests. Now, if no token is provided, it defaults to an empty string instead of null. Also, removed the requirement for a token to be present for server connection test to proceed.
  • Loading branch information
tanczosm committed Apr 11, 2024
1 parent fde60ef commit 2d0c695
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SpiceDb.Tests/SpiceDbClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public void SetUp()
// spicedb serve-testing
// default server address: 127.0.0.1:50051
var serverAddress = configurationRoot.GetValue<string>("SERVER_ADDRESS");
var token = configurationRoot.GetValue<string>("TOKEN");
var token = configurationRoot.GetValue<string>("TOKEN") ?? string.Empty;

if (string.IsNullOrEmpty(serverAddress) || string.IsNullOrEmpty(token))
if (string.IsNullOrEmpty(serverAddress))
{
Assert.Fail("Unable to load service configuration from environment variables");
}
Expand Down

0 comments on commit 2d0c695

Please sign in to comment.