Skip to content

Commit 3296783

Browse files
authored
CLOUDP-284160 Failed Test: mongodb-atlas-cli-master-github.com_mongodb_mongodb-atlas-cli_atlascli_test_e2e_atlas.TestDeploymentsLocalWithAuth/atlas_deployments_local_auth_e2e/e2e_local_deployments_ubuntu22 (#3388)
1 parent 13b0f60 commit 3296783

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

internal/mongodbclient/collection.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,14 @@ func (c *collection) SearchIndexByName(ctx context.Context, name string) (*Searc
9090
return nil, ErrSearchIndexNotFound
9191
}
9292

93-
return results[0], nil
93+
result := results[0]
94+
95+
coll := c.collection.Name()
96+
db := c.collection.Database().Name()
97+
result.CollectionName = &coll
98+
result.Database = &db
99+
100+
return result, nil
94101
}
95102

96103
func (c *collection) SearchIndexes(ctx context.Context) ([]*SearchIndexDefinition, error) {
@@ -104,6 +111,13 @@ func (c *collection) SearchIndexes(ctx context.Context) ([]*SearchIndexDefinitio
104111
return nil, err
105112
}
106113

114+
for _, result := range results {
115+
coll := c.collection.Name()
116+
db := c.collection.Database().Name()
117+
result.CollectionName = &coll
118+
result.Database = &db
119+
}
120+
107121
return results, nil
108122
}
109123

0 commit comments

Comments
 (0)