14 references to WithKeyFile
Aspire.Hosting.MongoDB (2)
ReplicaSet\MongoDBReplicaSetBuilderExtensions.cs (2)
397/// <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> 464member.WithKeyFile(builder.Resource.SharedKeyFileParameter);
Aspire.Hosting.MongoDB.Tests (12)
AddMongoDBTests.cs (6)
375.WithKeyFile(new ParameterResource("test", _ => "test"), "/the/key/file/path"); 574var mongo1 = builder.AddMongoDB("mongo1").WithKeyFile(keyValue, "/etc/rs.key").WithKeyFile(keyValue, "/etc/rs.key"); 584var mongo1 = builder.AddMongoDB("mongo1").WithKeyFile(new ParameterResource("a", _ => "a"), "/etc/rs.key"); 587() => mongo1.WithKeyFile(new ParameterResource("b", _ => "b"), "/etc/other.key")); 617Assert.Throws<NotSupportedException>(() => mongo1.WithKeyFile(new ParameterResource("test", _ => "test")));
MongoDBPublicApiTests.cs (4)
386var action = () => builder.WithKeyFile(keyValue, keyFilePath); 403var action = () => builder.WithKeyFile(keyValue, keyFilePath); 426var action = () => builder.WithKeyFile(keyValue, keyFilePath); 441var action = () => builder.WithKeyFile(keyValue, keyFilePath);
ReplicaSet\AddMongoDBReplicaSetTests.cs (2)
289var mongo1 = builder.AddMongoDB("mongo1").WithKeyFile(new ParameterResource("own-key", _ => "own-key")); 356var mongo1 = builder.AddMongoDB("mongo1").WithKeyFile(rs.Resource.SharedKeyFileParameter, "/custom/rs.key");