mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Add test to test endpoint code directly
This commit is contained in:
parent
d828d73eae
commit
163492801f
1 changed files with 15 additions and 2 deletions
17
api_test.go
17
api_test.go
|
|
@ -846,11 +846,24 @@ func TestAPI_IDAlloc(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
func TestAPI_SetAPIOptions(t *testing.T) {
|
||||
cluster := test.MustRunCluster(t, 1)
|
||||
func TestAPI_SchemaDetailsOff(t *testing.T) {
|
||||
cluster := test.MustRunCluster(t, 2)
|
||||
defer cluster.Close()
|
||||
cmd := cluster.GetNode(0)
|
||||
cmd.API.SetAPIOptions(pilosa.OptAPISchemaDetailsOn(false))
|
||||
schema, err := cmd.API.SchemaDetails(context.Background())
|
||||
if err != nil {
|
||||
t.Fatalf("getting schema: %v", err)
|
||||
}
|
||||
|
||||
for _, i := range schema {
|
||||
for _, f := range i.Fields {
|
||||
if f.Cardinality != nil {
|
||||
t.Fatalf("expected nil cardinality, got: %v", *f.Cardinality)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
type mutexCheckIndex struct {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue