Skip to content

Commit 11f038d

Browse files
committed
Assert presetTopology for ncc module examples
1 parent 2f7ef6e commit 11f038d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/integration/network_connectivity_center/network_connectivity_center_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,16 @@ func TestNetworkConnectivityCenter(t *testing.T) {
3434
nccHubStarName := net.GetStringOutput("ncc_hub_name_star")
3535

3636
op := gcloud.Run(t, "network-connectivity hubs describe ", gcloud.WithCommonArgs([]string{nccHubName, "--project", projectID, "--format", "json"}))
37+
meshPresetTopology := op.Get("presetTopology").String()
38+
assert.Equal("MESH", meshPresetTopology, "should have mesh topology")
3739
nccSpokeStateCount := op.Get("spokeSummary.spokeStateCounts").Array()
3840
assert.Equal(1, len(nccSpokeStateCount), "should have spokes in one State")
3941
assert.Equal("ACTIVE", nccSpokeStateCount[0].Get("state").String(), "should have only active spokes")
4042

43+
starHub := gcloud.Run(t, "network-connectivity hubs describe ", gcloud.WithCommonArgs([]string{nccHubStarName, "--project", projectID, "--format", "json"}))
44+
starPresetTopology := starHub.Get("presetTopology").String()
45+
assert.Equal("STAR", starPresetTopology, "should have star topology")
46+
4147
groups := gcloud.Run(t, "network-connectivity hubs groups list ", gcloud.WithCommonArgs([]string{"--hub", nccHubStarName, "--project", projectID, "--format", "json"})).Get("groups").Array()
4248
assert.Equal(2, len(groups), "should have two groups")
4349
for _, group := range groups {

0 commit comments

Comments
 (0)