Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix(tests): add mock methods for cache OAuth state in new question notification tests

LinkinStars0705ea6baeaf
diff --git a/internal/service/notification/new_question_notification_test.go b/internal/service/notification/new_question_notification_test.go
index 754481f6..3bb6a3dd 100644
--- a/internal/service/notification/new_question_notification_test.go
+++ b/internal/service/notification/new_question_notification_test.go
@@ -798,3 +798,18 @@ func (newQuestionNotificationTestUserExternalLoginRepo) GetCacheUserExternalLogi
context.Context, string) (*schema.ExternalLoginUserInfoCache, error) {
return nil, nil
}
+
+func (newQuestionNotificationTestUserExternalLoginRepo) SetCacheOAuthState(
+ context.Context, string, *schema.ExternalLoginOAuthState, time.Duration) error {
+ return nil
+}
+
+func (newQuestionNotificationTestUserExternalLoginRepo) GetCacheOAuthState(
+ context.Context, string) (*schema.ExternalLoginOAuthState, error) {
+ return nil, nil
+}
+
+func (newQuestionNotificationTestUserExternalLoginRepo) DeleteCacheOAuthState(
+ context.Context, string) error {
+ return nil
+}