lock on every http req BUT LOCKS ON TELEMETRY SO BEWARE

This commit is contained in:
Bel LaPointe
2023-03-27 06:18:32 -06:00
parent f14871218d
commit 85804d6f84
5 changed files with 16 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import (
"os"
"path"
"strings"
"sync"
"testing"
"gopkg.in/yaml.v2"
@@ -53,6 +54,7 @@ func TestPatchConfig(t *testing.T) {
FlagParseV01Config = p
}
v01 := &V01{cfg: c.was}
v01.cfg.lock = &sync.Mutex{}
w := httptest.NewRecorder()
r := httptest.NewRequest(http.MethodPatch, "/config", strings.NewReader(c.patch))