Skip to content

Commit

Permalink
Add more cases to platform test
Browse files Browse the repository at this point in the history
  • Loading branch information
bjee19 committed Mar 12, 2024
1 parent 3ff7df2 commit e6b99ba
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions internal/mode/static/telemetry/platform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ func TestGetPlatform(t *testing.T) {
expectedPlatform: "openshift",
name: "openshift platform",
},
{
node: &v1.Node{
Spec: v1.NodeSpec{
ProviderID: "different-platform://ip-172-16-0-210",
},
},
namespaces: &v1.NamespaceList{},
expectedPlatform: "other_different-platform",
name: "other platform",
},
{
node: &v1.Node{},
namespaces: &v1.NamespaceList{},
expectedPlatform: "other",
name: "missing providerID",
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
Expand Down

0 comments on commit e6b99ba

Please sign in to comment.