diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 04115d95f..8a7da8016 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -195,7 +195,7 @@ jobs: - name: Deploy snapshot if: ${{ endsWith(steps.get-revision.outputs.REVISION, '-SNAPSHOT') }} - run: mvn -B -ntp -fae -pl !integration-tests,!integration-tests/db,!integration-tests/srv -Dmaven.install.skip=true -Dmaven.test.skip=true -DdeployAtEnd=true deploy + run: mvn -B -ntp -fae -pl !integration-tests,!integration-tests/db,!integration-tests/generic,!integration-tests/mtx-local/srv -Dmaven.install.skip=true -Dmaven.test.skip=true -DdeployAtEnd=true deploy env: DEPLOYMENT_USER: ${{ secrets.DEPLOYMENT_USER }} DEPLOYMENT_PASS: ${{ secrets.DEPLOYMENT_PASS }} diff --git a/.pipeline/config.yml b/.pipeline/config.yml index aa968f3c7..379a734be 100644 --- a/.pipeline/config.yml +++ b/.pipeline/config.yml @@ -22,7 +22,7 @@ steps: scanProperties: - --detect.included.detector.types=MAVEN - --detect.excluded.directories='**/node_modules,**/*test*,**/localrepo,**/target/site,**/*-site.jar,**/samples/**' - - --detect.maven.excluded.modules=integration-tests,integration-tests/db,integration-tests/srv + - --detect.maven.excluded.modules=integration-tests,integration-tests/db,integration-tests/generic,integration-tests/mtx-local/srv - --detect.maven.build.command='-pl com.sap.cds:cds-feature-attachments' # https://www.project-piper.io/steps/detectExecuteScan/#dockerimage # If empty, Docker is not used and the command is executed directly on the Jenkins system. diff --git a/integration-tests/.cdsrc.json b/integration-tests/.cdsrc.json index 0b8f71263..5b0a7480b 100644 --- a/integration-tests/.cdsrc.json +++ b/integration-tests/.cdsrc.json @@ -1,13 +1,5 @@ { "cds": { - "requires": { - "outbox": { - "kind": "persistent-outbox" - } - }, - "fiori": { - "draft_messages": false - }, "build": { "tasks": [ { "for": "java", "src": "generic" } diff --git a/integration-tests/srv/src/test/java/com/sap/cds/feature/attachments/integrationtests/draftservice/NonAttachmentCompositionDraftTest.java b/integration-tests/srv/src/test/java/com/sap/cds/feature/attachments/integrationtests/draftservice/NonAttachmentCompositionDraftTest.java deleted file mode 100644 index 78c272ec6..000000000 --- a/integration-tests/srv/src/test/java/com/sap/cds/feature/attachments/integrationtests/draftservice/NonAttachmentCompositionDraftTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * © 2026 SAP SE or an SAP affiliate company and cds-feature-attachments contributors. - */ -package com.sap.cds.feature.attachments.integrationtests.draftservice; - -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -import com.sap.cds.CdsData; -import com.sap.cds.Struct; -import com.sap.cds.feature.attachments.generated.integration.test.cds4j.testdraftservice.DraftRoots; -import com.sap.cds.feature.attachments.generated.integration.test.cds4j.testdraftservice.DraftRoots_; -import com.sap.cds.feature.attachments.integrationtests.common.MockHttpRequestHelper; -import com.sap.cds.feature.attachments.integrationtests.common.TableDataDeleter; -import com.sap.cds.feature.attachments.integrationtests.constants.Profiles; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.ActiveProfiles; - -/** - * Regression test for GitHub issue cap/issues#20410. - * - *

Creating a non-attachment composition child (Contributors) via DRAFT_NEW must not crash with - * "No element with name 'content'" even though the parent entity (Roots) also has attachment - * compositions. - */ -@SpringBootTest -@AutoConfigureMockMvc -@ActiveProfiles(Profiles.TEST_HANDLER_DISABLED) -class NonAttachmentCompositionDraftTest { - - private static final String BASE_URL = MockHttpRequestHelper.ODATA_BASE_URL + "TestDraftService/"; - private static final String BASE_ROOT_URL = BASE_URL + "DraftRoots"; - - @Autowired private MockHttpRequestHelper requestHelper; - @Autowired private TableDataDeleter dataDeleter; - - @AfterEach - void teardown() { - dataDeleter.deleteData(DraftRoots_.CDS_NAME, DraftRoots_.CDS_NAME + "_drafts"); - requestHelper.resetHelper(); - } - - @Test - void createNonAttachmentCompositionInDraft_shouldSucceed() throws Exception { - String rootId = createDraftRootAndReturnId(); - - String contributorsUrl = - BASE_ROOT_URL + "(ID=" + rootId + ",IsActiveEntity=false)/contributors"; - - requestHelper.executePostWithMatcher( - contributorsUrl, "{\"name\":\"Alice\"}", status().isCreated()); - } - - private String createDraftRootAndReturnId() throws Exception { - CdsData response = - requestHelper.executePostWithODataResponseAndAssertStatusCreated(BASE_ROOT_URL, "{}"); - DraftRoots draftRoot = Struct.access(response).as(DraftRoots.class); - requestHelper.executePatchWithODataResponseAndAssertStatusOk( - getRootUrl(draftRoot.getId()), "{\"title\":\"test\"}"); - return draftRoot.getId(); - } - - private String getRootUrl(String rootId) { - return BASE_ROOT_URL + "(ID=" + rootId + ",IsActiveEntity=false)"; - } -}