Limit incoming request body size for all endpoints and add rate limiting wrappera round storage
This commit is contained in:
@@ -23,11 +23,11 @@ func TestIntegration(t *testing.T) {
|
||||
f.Close()
|
||||
defer os.Remove(f.Name())
|
||||
os.Setenv("DBURI", f.Name())
|
||||
graph := NewGraph()
|
||||
graph := NewRateLimitedGraph()
|
||||
ctx, can := context.WithCancel(context.TODO())
|
||||
defer can()
|
||||
clean := func() {
|
||||
graph.driver.Delete(context.TODO(), "col", map[string]string{})
|
||||
graph.g.driver.Delete(context.TODO(), "col", map[string]string{})
|
||||
}
|
||||
clean()
|
||||
defer clean()
|
||||
@@ -42,7 +42,7 @@ func TestIntegration(t *testing.T) {
|
||||
cleanFill := func() {
|
||||
clean()
|
||||
for i := range ones {
|
||||
if err := graph.driver.Insert(context.TODO(), "col", ones[i]); err != nil {
|
||||
if err := graph.g.driver.Insert(context.TODO(), "col", ones[i]); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user