fix(AuthClientTests): StartAsync_ShouldUpdateAllPublicKey aktualisiert
This commit is contained in:
parent
4e941ed35f
commit
6ac2c86520
@ -194,18 +194,17 @@ public class AuthClientTests
|
|||||||
var provider = Build(opt =>
|
var provider = Build(opt =>
|
||||||
{
|
{
|
||||||
opt.Url = _hubUrl;
|
opt.Url = _hubUrl;
|
||||||
opt.PublicKeys.Add(new AsymmetricPublicKey() { Issuer = "Foo", Audience = "Bar" });
|
opt.PublicKeys.Add(publicKey);
|
||||||
});
|
});
|
||||||
var client = provider.GetRequiredService<IAuthClient>();
|
var client = provider.GetRequiredService<IAuthClient>();
|
||||||
await client.StartAsync();
|
await client.StartAsync();
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var expectedPublicKey = _tokenDescriptors.Get("Foo", "Bar").PublicKey;
|
||||||
|
|
||||||
// wait for network
|
// wait for network
|
||||||
await Task.Delay(2000);
|
await Task.Delay(2000);
|
||||||
|
|
||||||
// Act
|
|
||||||
var expectedPublicKey = _tokenDescriptors.Get("Foo", "Bar").PublicKey;
|
|
||||||
await client.GetPublicKeyAsync("Foo", "Bar");
|
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.That(publicKey.Content, Is.EqualTo(expectedPublicKey.Content));
|
Assert.That(publicKey.Content, Is.EqualTo(expectedPublicKey.Content));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user