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. 538builder.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> 462member.WithKeyFile(builder.Resource.SharedKeyFileParameter);
Aspire.Hosting.MongoDB.Tests (13)
AddMongoDBTests.cs (6)
446.WithKeyFile(new ParameterResource("test", _ => "test"), "/the/key/file/path"); 702var mongo1 = builder.AddMongoDB("mongo1").WithKeyFile(keyValue, "/etc/rs.key").WithKeyFile(keyValue, "/etc/rs.key"); 712var mongo1 = builder.AddMongoDB("mongo1").WithKeyFile(new ParameterResource("a", _ => "a"), "/etc/rs.key"); 715() => mongo1.WithKeyFile(new ParameterResource("b", _ => "b"), "/etc/other.key")); 745Assert.Throws<NotSupportedException>(() => mongo1.WithKeyFile(new ParameterResource("test", _ => "test")));
MongoDBPublicApiTests.cs (4)
382var action = () => builder.WithKeyFile(keyValue, keyFilePath); 399var action = () => builder.WithKeyFile(keyValue, keyFilePath); 422var action = () => builder.WithKeyFile(keyValue, keyFilePath); 437var action = () => builder.WithKeyFile(keyValue, keyFilePath);
ReplicaSet\AddMongoDBReplicaSetTests.cs (2)
314var mongo1 = builder.AddMongoDB("mongo1").WithKeyFile(new ParameterResource("own-key", _ => "own-key")); 381var mongo1 = builder.AddMongoDB("mongo1").WithKeyFile(rs.Resource.SharedKeyFileParameter, "/custom/rs.key");
SingleMemberReplicaSetTests.cs (1)
49var mongo = builder.AddMongoDB("mongo").WithKeyFile(key.Resource, "/etc/custom.key").WithReplicaSet("rs0").WithReplicaSet();