Skip to content

Commit

Permalink
Add nil Clusters test for local data source
Browse files Browse the repository at this point in the history
  • Loading branch information
markgoddard committed Jan 27, 2025
1 parent 978a311 commit 654b541
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/plugin/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,16 @@ func TestLocalDataSource_UpdateTrustZone(t *testing.T) {
wantErr: true,
wantErrString: "expected exactly one cluster per trust zone",
},
{
name: "nil clusters list",
trustZone: func() *trust_zone_proto.TrustZone {
tz := fixtures.TrustZone("tz1")
tz.Clusters = nil
return tz
}(),
wantErr: true,
wantErrString: "expected exactly one cluster per trust zone",
},
{
name: "multiple clusters list",
trustZone: func() *trust_zone_proto.TrustZone {
Expand Down

0 comments on commit 654b541

Please sign in to comment.