integration test

This commit is contained in:
Yuri Tseretyan 2025-10-03 13:12:31 -04:00
parent afcb866599
commit c89265bb7c
2 changed files with 3 additions and 2 deletions

View File

@ -133,7 +133,7 @@ func convertToDomainModel(receiver *model.Receiver) (*ngmodels.Receiver, map[str
}
var config schema.IntegrationSchemaVersion
typeSchema, _ := alertingNotify.GetSchemaForIntegration(t)
if integration.Version == "" {
if integration.Version != "" {
var ok bool
config, ok = typeSchema.GetVersion(schema.Version(integration.Version))
if !ok {

View File

@ -1320,7 +1320,8 @@ func TestIntegrationCRUD(t *testing.T) {
typeSchema, ok := notify.GetSchemaVersionForIntegration(integrationType, schema.V1)
require.True(t, ok)
secretFields := typeSchema.GetSecretFieldsPaths()
for _, field := range secretFields {
for _, fieldPath := range secretFields {
field := fieldPath.String()
if _, ok := fields[field]; !ok { // skip field that is not in the original setting
continue
}