Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix: isolate community test stubs from EE builds (#21672)

buua43697b08d6585ee
diff --git a/internal/dao/stub.go b/internal/dao/stub.go
index 668ac70a3d..62334b815c 100644
--- a/internal/dao/stub.go
+++ b/internal/dao/stub.go
@@ -26,6 +26,9 @@ import (
"gorm.io/gorm"
)
+// tenantDAOTestExtraModels adds no tables beyond the community schema.
+func tenantDAOTestExtraModels() []interface{} { return nil }
+
// permissionDataModelsEE returns no additional entities in the community
// edition.
func permissionDataModelsEE() []interface{} { return nil }
diff --git a/internal/dao/test_helpers_test.go b/internal/dao/test_helpers_test.go
deleted file mode 100644
index f1d506f054..0000000000
--- a/internal/dao/test_helpers_test.go
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// Copyright 2026 The InfiniFlow Authors. All Rights Reserved.
-//
-// Licensed 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 dao
-
-// tenantDAOTestExtraModels adds no tables beyond the community schema.
-func tenantDAOTestExtraModels() []interface{} { return nil }
diff --git a/internal/permission/testsupport/fixture.go b/internal/permission/testsupport/stub.go
similarity index 98%
rename from internal/permission/testsupport/fixture.go
rename to internal/permission/testsupport/stub.go
index ca2093a5ed..0afb0476dd 100644
--- a/internal/permission/testsupport/fixture.go
+++ b/internal/permission/testsupport/stub.go
@@ -1,3 +1,5 @@
+//go:build !ee
+
// Copyright 2026 The InfiniFlow Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");