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

Function TestCreateScopeConfig

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

Source from the content-addressed store, hash-verified

247}
248
249func TestCreateScopeConfig(t *testing.T) {
250 client := CreateClient(t)
251 connection := CreateTestConnection(client)
252 scopeConfig := FakeScopeConfig{Name: "Scope config", Env: "test env", Entities: []string{plugin.DOMAIN_TYPE_CICD}}
253
254 res := client.CreateScopeConfig(PLUGIN_NAME, connection.ID, scopeConfig)
255 scopeConfig = helper.Cast[FakeScopeConfig](res)
256
257 res = client.GetScopeConfig(PLUGIN_NAME, connection.ID, scopeConfig.Id)
258 scopeConfig = helper.Cast[FakeScopeConfig](res)
259 require.Equal(t, "Scope config", scopeConfig.Name)
260 require.Equal(t, "test env", scopeConfig.Env)
261 require.Equal(t, []string{plugin.DOMAIN_TYPE_CICD}, scopeConfig.Entities)
262}
263
264func TestUpdateScopeConfig(t *testing.T) {
265 client := CreateClient(t)

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected