This is an automated email from the ASF dual-hosted git repository.

LinkinStars pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/answer.git

commit 04b602a7e50f632aeedd3b69e4f961d4c18f8ac1
Author: seiya <[email protected]>
AuthorDate: Thu Oct 15 13:15:54 2026 +0000

    Revert "test: expose swallowed revision lookup error"
    
    This reverts commit 304ff973bb91c1db3622817fe2ac88eed5c5c927.
---
 internal/service/content/revision_service_test.go | 51 -----------------------
 1 file changed, 51 deletions(-)

diff --git a/internal/service/content/revision_service_test.go 
b/internal/service/content/revision_service_test.go
deleted file mode 100644
index 9545b583..00000000
--- a/internal/service/content/revision_service_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package content
-
-import (
-       "context"
-       "errors"
-       "testing"
-
-       "github.com/apache/answer/internal/entity"
-       "github.com/apache/answer/internal/schema"
-       "github.com/apache/answer/internal/service/revision"
-)
-
-type checkCanUpdateRevisionErrorRepo struct {
-       revision.RevisionRepo
-       err error
-}
-
-func (r *checkCanUpdateRevisionErrorRepo) 
ExistUnreviewedByObjectID(context.Context, string) (*entity.Revision, bool, 
error) {
-       return nil, false, r.err
-}
-
-func TestCheckCanUpdateRevisionPropagatesLookupError(t *testing.T) {
-       wantErr := errors.New("revision lookup failed")
-       service := &RevisionService{
-               revisionRepo: &checkCanUpdateRevisionErrorRepo{err: wantErr},
-       }
-
-       _, err := service.CheckCanUpdateRevision(context.Background(), 
&schema.CheckCanQuestionUpdate{ID: "1"})
-       if !errors.Is(err, wantErr) {
-               t.Fatalf("CheckCanUpdateRevision() error = %v, want %v", err, 
wantErr)
-       }
-}

Reply via email to