MCPcopy Create free account
hub / github.com/QuantumNous/new-api / setupTaskPluginFactoryDisableTest

Function setupTaskPluginFactoryDisableTest

controller/task_plugin_test.go:120–133  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

118}
119
120func setupTaskPluginFactoryDisableTest(t *testing.T) {
121 t.Helper()
122 setupTaskPluginControllerTest(t)
123 originalMap := common.OptionMap
124 common.OptionMapRWMutex.Lock()
125 common.OptionMap = map[string]string{}
126 common.OptionMapRWMutex.Unlock()
127 t.Cleanup(func() {
128 jsplugin.DefaultRegistry.SetDisabledFactoryKeys(nil)
129 common.OptionMapRWMutex.Lock()
130 common.OptionMap = originalMap
131 common.OptionMapRWMutex.Unlock()
132 })
133}
134
135func postTaskPluginStatus(t *testing.T, key, query, body string) *httptest.ResponseRecorder {
136 t.Helper()

Calls 3

UnlockMethod · 0.80

Tested by

no test coverage detected