17 references to WithKeyFile
Aspire.Hosting.MongoDB (4)
MongoDBBuilderExtensions.cs (2)
490
/// A key file is generated for authentication unless <see cref="
WithKeyFile
"/> was called first.
538
builder.
WithKeyFile
(CreateReplicaSetKeyFile(builder.ApplicationBuilder, builder.Resource.Name));
ReplicaSet\MongoDBReplicaSetBuilderExtensions.cs (2)
389
/// <item> <description><see cref="MongoDBBuilderExtensions.
WithKeyFile
(IResourceBuilder{MongoDBServerResource}, IExpressionValue, string)"/> to set the key file parameter on the member resource, which is required for internal authentication between replica set members. </description></item>
462
member.
WithKeyFile
(builder.Resource.SharedKeyFileParameter);
Aspire.Hosting.MongoDB.Tests (13)
AddMongoDBTests.cs (6)
446
.
WithKeyFile
(new ParameterResource("test", _ => "test"), "/the/key/file/path");
702
var mongo1 = builder.AddMongoDB("mongo1").
WithKeyFile
(keyValue, "/etc/rs.key").
WithKeyFile
(keyValue, "/etc/rs.key");
712
var mongo1 = builder.AddMongoDB("mongo1").
WithKeyFile
(new ParameterResource("a", _ => "a"), "/etc/rs.key");
715
() => mongo1.
WithKeyFile
(new ParameterResource("b", _ => "b"), "/etc/other.key"));
745
Assert.Throws<NotSupportedException>(() => mongo1.
WithKeyFile
(new ParameterResource("test", _ => "test")));
MongoDBPublicApiTests.cs (4)
382
var action = () => builder.
WithKeyFile
(keyValue, keyFilePath);
399
var action = () => builder.
WithKeyFile
(keyValue, keyFilePath);
422
var action = () => builder.
WithKeyFile
(keyValue, keyFilePath);
437
var action = () => builder.
WithKeyFile
(keyValue, keyFilePath);
ReplicaSet\AddMongoDBReplicaSetTests.cs (2)
314
var mongo1 = builder.AddMongoDB("mongo1").
WithKeyFile
(new ParameterResource("own-key", _ => "own-key"));
381
var mongo1 = builder.AddMongoDB("mongo1").
WithKeyFile
(rs.Resource.SharedKeyFileParameter, "/custom/rs.key");
SingleMemberReplicaSetTests.cs (1)
49
var mongo = builder.AddMongoDB("mongo").
WithKeyFile
(key.Resource, "/etc/custom.key").WithReplicaSet("rs0").WithReplicaSet();