18 references to WithKeyFile
Aspire.Hosting.MongoDB (4)
MongoDBBuilderExtensions.cs (2)
491/// A key file is generated for authentication unless <see cref="WithKeyFile"/> was called first. 539builder.WithKeyFile(CreateReplicaSetKeyFile(builder.ApplicationBuilder, builder.Resource.Name));
ReplicaSet\MongoDBReplicaSetBuilderExtensions.cs (2)
371/// <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> 444member.WithKeyFile(builder.Resource.SharedKeyFileParameter);
Aspire.Hosting.MongoDB.Tests (14)
AddMongoDBTests.cs (7)
447var mongo = builder.AddMongoDB("mongo").WithKeyFile(key).Resource; 476.WithKeyFile(new ParameterResource("test", _ => "test"), "/the/key/file/path"); 732var mongo1 = builder.AddMongoDB("mongo1").WithKeyFile(keyValue, "/etc/rs.key").WithKeyFile(keyValue, "/etc/rs.key"); 742var mongo1 = builder.AddMongoDB("mongo1").WithKeyFile(new ParameterResource("a", _ => "a"), "/etc/rs.key"); 745() => mongo1.WithKeyFile(new ParameterResource("b", _ => "b"), "/etc/other.key")); 775Assert.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)
53var mongo = builder.AddMongoDB("mongo").WithKeyFile(key.Resource, "/etc/custom.key").WithReplicaSet("rs0").WithReplicaSet();