(t *testing.T)
| 262 | } |
| 263 | |
| 264 | func 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 | |
| 278 | func TestDeleteScopeConfig(t *testing.T) { |
| 279 | client := CreateClient(t) |
nothing calls this directly
no test coverage detected