We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 569b229 commit 8481b43Copy full SHA for 8481b43
e2e/atlas/metrics_processes_test.go
@@ -83,6 +83,29 @@ func TestAtlasMetrics(t *testing.T) {
83
}
84
})
85
86
+ t.Run("databases list", func(t *testing.T) {
87
+ cmd := exec.Command(cliPath,
88
+ atlasEntity,
89
+ metricsEntity,
90
+ "databases",
91
+ "list",
92
+ hostname)
93
+
94
+ cmd.Env = os.Environ()
95
+ resp, err := cmd.CombinedOutput()
96
97
+ databases := &mongodbatlas.ProcessDatabasesResponse{}
98
+ err = json.Unmarshal(resp, &databases)
99
100
+ if err != nil {
101
+ t.Fatalf("unexpected error: %v", err)
102
+ }
103
104
+ if databases.TotalCount != 2 {
105
+ t.Errorf("got=%#v\nwant=%#v\n", databases.TotalCount, 2)
106
107
+ })
108
109
deleteCluster(cliPath, atlasEntity, clusterName)
110
111
0 commit comments