Skip to content

Commit ed7d4cc

Browse files
committed
Fix BaseRepositoryTests - always use Generic settings for genericRepo
The genericRepo should always use GenericRepositorySettingsImpl, not the package-specific settings from getRepositorySettings(). This ensures that genericRepo always has package type 'Generic', which is required when it's included in virtual repositories of any package type. This fixes the root cause of package type mismatch errors across all package-specific test suites.
1 parent 50d7cd6 commit ed7d4cc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

services/src/test/groovy/org/jfrog/artifactory/client/BaseRepositoryTests.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import org.jfrog.artifactory.client.model.impl.ContentSyncImpl
1717
import org.jfrog.artifactory.client.model.impl.RepositoryTypeImpl
1818
import org.jfrog.artifactory.client.model.repository.settings.RepositorySettings
1919
import org.jfrog.artifactory.client.model.repository.settings.XraySettings
20+
import org.jfrog.artifactory.client.model.repository.settings.impl.GenericRepositorySettingsImpl
2021
import org.jfrog.artifactory.client.model.xray.settings.impl.XraySettingsImpl
2122
import org.testng.annotations.AfterMethod
2223
import org.testng.annotations.BeforeMethod
@@ -59,7 +60,7 @@ abstract class BaseRepositoryTests extends ArtifactoryTestsBase {
5960
String id = Long.toString(repoUniqueId)
6061
println "[SETUP] Starting test setup for repo id: $id at ${new Date()}"
6162
if (prepareGenericRepo) {
62-
RepositorySettings settings = getRepositorySettings(RepositoryTypeImpl.LOCAL)
63+
RepositorySettings settings = new GenericRepositorySettingsImpl()
6364

6465
XraySettings genericXraySettings = new XraySettingsImpl()
6566
genericRepo = artifactory.repositories().builders().localRepositoryBuilder()

0 commit comments

Comments
 (0)