MCPcopy Index your code
hub / github.com/apache/devlake / TestDeleteScopeConfig

Function TestDeleteScopeConfig

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

Source from the content-addressed store, hash-verified

276}
277
278func TestDeleteScopeConfig(t *testing.T) {
279 client := CreateClient(t)
280 connection := CreateTestConnection(client)
281 scopeConfig := FakeScopeConfig{Name: "Scope config", Env: "test env", Entities: []string{plugin.DOMAIN_TYPE_CICD}}
282 scopeConfig = helper.Cast[FakeScopeConfig](client.CreateScopeConfig(PLUGIN_NAME, connection.ID, scopeConfig))
283
284 configs := helper.Cast[[]FakeScopeConfig](client.ListScopeConfigs(PLUGIN_NAME, connection.ID))
285 require.Equal(t, 1, len(configs))
286
287 client.DeleteScopeConfig(PLUGIN_NAME, connection.ID, scopeConfig.Id)
288 configs = helper.Cast[[]FakeScopeConfig](client.ListScopeConfigs(PLUGIN_NAME, connection.ID))
289 require.Equal(t, 0, len(configs))
290}
291
292func TestDeleteScopeConfig_WithReferencingScope(t *testing.T) {
293 client := CreateClient(t)

Callers

nothing calls this directly

Calls 5

CreateClientFunction · 0.85
CreateTestConnectionFunction · 0.85
CreateScopeConfigMethod · 0.80
ListScopeConfigsMethod · 0.65
DeleteScopeConfigMethod · 0.45

Tested by

no test coverage detected