mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
Update internal endpoints
This commit is contained in:
parent
0649ba3f8d
commit
65cb2cdf73
2 changed files with 7 additions and 7 deletions
|
|
@ -616,7 +616,7 @@ func (c *Client) fetchFragmentNodes(indexName string, shard uint64) ([]fragmentN
|
|||
if c.manualFragmentNode != nil {
|
||||
return []fragmentNode{*c.manualFragmentNode}, nil
|
||||
}
|
||||
path := fmt.Sprintf("/pb.fragment/nodes?shard=%d&index=%s", shard, indexName)
|
||||
path := fmt.Sprintf("/internal/fragment/nodes?shard=%d&index=%s", shard, indexName)
|
||||
_, body, err := c.HTTPRequest("GET", path, []byte{}, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -787,14 +787,14 @@ func (c *Client) readSchema() ([]SchemaIndex, error) {
|
|||
}
|
||||
|
||||
func (c *Client) shardsMax() (map[string]uint64, error) {
|
||||
_, data, err := c.HTTPRequest("GET", "/pb.shards/max", nil, nil)
|
||||
_, data, err := c.HTTPRequest("GET", "/internal/shards/max", nil, nil)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "requesting /pb.shards/max")
|
||||
return nil, errors.Wrap(err, "requesting /internal/shards/max")
|
||||
}
|
||||
m := map[string]map[string]uint64{}
|
||||
err = json.Unmarshal(data, &m)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "unmarshaling /pb.shards/max data")
|
||||
return nil, errors.Wrap(err, "unmarshaling /internal/shards/max data")
|
||||
}
|
||||
return m["standard"], nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1473,7 +1473,7 @@ func TestExportFieldFailure(t *testing.T) {
|
|||
statusCode: 404,
|
||||
contentLength: -1,
|
||||
},
|
||||
"/pb.shards/max": {
|
||||
"/internal/shards/max": {
|
||||
content: []byte(`{"standard":{"go-testindex": 0}}`),
|
||||
statusCode: 404,
|
||||
contentLength: -1,
|
||||
|
|
@ -1493,9 +1493,9 @@ func TestExportFieldFailure(t *testing.T) {
|
|||
if err == nil {
|
||||
t.Fatal("should have failed")
|
||||
}
|
||||
statusItem = paths["/pb.shards/max"]
|
||||
statusItem = paths["/internal/shards/max"]
|
||||
statusItem.statusCode = 200
|
||||
paths["/pb.shards/max"] = statusItem
|
||||
paths["/internal/shards/max"] = statusItem
|
||||
_, err = client.ExportField(testField)
|
||||
if err == nil {
|
||||
t.Fatal("should have failed")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue