MCPcopy
hub / github.com/apache/devlake / TestUpdateScopeConfig

Function TestUpdateScopeConfig

backend/test/e2e/remote/python_plugin_test.go:264–276  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

262}
263
264func TestUpdateScopeConfig(t *testing.T) {
265 client := CreateClient(t)
266 connection := CreateTestConnection(client)
267 res := client.CreateScopeConfig(PLUGIN_NAME, connection.ID, FakeScopeConfig{Name: "old name", Env: "old env", Entities: []string{}})
268 oldScopeConfig := helper.Cast[FakeScopeConfig](res)
269
270 client.PatchScopeConfig(PLUGIN_NAME, connection.ID, oldScopeConfig.Id, FakeScopeConfig{Name: "new name", Env: "new env", Entities: []string{plugin.DOMAIN_TYPE_CICD}})
271
272 res = client.GetScopeConfig(PLUGIN_NAME, connection.ID, oldScopeConfig.Id)
273 scopeConfig := helper.Cast[FakeScopeConfig](res)
274 require.Equal(t, "new name", scopeConfig.Name)
275 require.Equal(t, "new env", scopeConfig.Env)
276}
277
278func TestDeleteScopeConfig(t *testing.T) {
279 client := CreateClient(t)

Callers

nothing calls this directly

Calls 5

CreateClientFunction · 0.85
CreateTestConnectionFunction · 0.85
CreateScopeConfigMethod · 0.80
GetScopeConfigMethod · 0.65
PatchScopeConfigMethod · 0.45

Tested by

no test coverage detected