(t *testing.T)
| 118 | } |
| 119 | |
| 120 | func 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 | |
| 135 | func postTaskPluginStatus(t *testing.T, key, query, body string) *httptest.ResponseRecorder { |
| 136 | t.Helper() |
no test coverage detected