test: add unit test cases

This commit is contained in:
Fu Diwei
2024-11-21 10:29:04 +08:00
parent 0b9312b549
commit 13582d1a7b
34 changed files with 434 additions and 28 deletions

View File

@@ -1,7 +1,7 @@
package notify
import (
"errors"
"fmt"
"github.com/usual2970/certimate/internal/domain"
"github.com/usual2970/certimate/internal/pkg/core/notifier"
@@ -62,5 +62,5 @@ func createNotifier(channel string, channelConfig map[string]any) (notifier.Noti
})
}
return nil, errors.New("unsupported notifier channel")
return nil, fmt.Errorf("unsupported notifier channel: %s", channelConfig)
}