Skip to content

Commit

Permalink
Fixes DockerComposePsSettings Filter property
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaMarkic committed Feb 16, 2024
1 parent f07b464 commit 935fbb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Cake.Docker.Tests/Compose/Ps/DockerComposePsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public void WhenNoServiceAreSet_CommandLineIsCorrect()
{
var fixture = new DockerComposePsFixture
{
Settings = new DockerComposePsSettings { Filters = ["filter"] },
Settings = new DockerComposePsSettings { Filter = ["filter"] },
};

var actual = fixture.Run();
Expand All @@ -23,7 +23,7 @@ public void WhenSingleFilterIsSet_CommandLineIsCorrect()
{
var fixture = new DockerComposePsFixture
{
Settings = new DockerComposePsSettings { Filters = ["filter"] },
Settings = new DockerComposePsSettings { Filter = ["filter"] },
Services = ["serviceA", "serviceB"],
};

Expand All @@ -37,7 +37,7 @@ public void WhenMultipleFilterIsSet_CommandLineIsCorrect()
{
var fixture = new DockerComposePsFixture
{
Settings = new DockerComposePsSettings { Filters = ["filter1", "filter2"] },
Settings = new DockerComposePsSettings { Filter = ["filter1", "filter2"] },
Services = ["serviceA", "serviceB"],
};

Expand Down
3 changes: 2 additions & 1 deletion src/Cake.Docker/Compose/Ps/DockerComposePsSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public sealed class DockerComposePsSettings : DockerComposeSettings
/// Filter services by a property (supported
/// filters: status).
/// </summary>
public string? Filter { get; set; }
[AutoProperty(Format = "--filter {1}")]
public string[]? Filter { get; set; }
/// <summary>
/// Format output using a custom template:
/// 'table': Print output in table
Expand Down

0 comments on commit 935fbb3

Please sign in to comment.