fix: oidc (#633)

* fix: oidc

* revert: verbose oidc logs

* fix: actually commit changes

* chore: cleanup var name

* chore: address pr feedback
This commit is contained in:
Jarrett Confrey
2021-05-24 09:33:39 -07:00
committed by GitHub
parent 3ce35a74bf
commit ac0f43b576
7 changed files with 213 additions and 7 deletions

View File

@@ -3,11 +3,13 @@ using System.Threading;
using System.Threading.Tasks;
using FluentAssertions;
using k8s.Authentication;
using Xunit;
namespace k8s.Tests
{
public class TokenFileAuthTests
{
[Fact]
public async Task TestToken()
{
var auth = new TokenFileAuth("assets/token1");
@@ -20,7 +22,7 @@ namespace k8s.Tests
result.Scheme.Should().Be("Bearer");
result.Parameter.Should().Be("token1");
auth.TokenExpiresAt = DateTime.UtcNow;
auth.TokenExpiresAt = DateTime.UtcNow.AddSeconds(-1);
result = await auth.GetAuthenticationHeaderAsync(CancellationToken.None).ConfigureAwait(false);
result.Scheme.Should().Be("Bearer");
result.Parameter.Should().Be("token2");