Fix/acs 2851 intermittent integration full tests bulk 2 (#1074)

* ACS-2851: Reverting commented out unstable test, as the intermittent failure seems unreproducible
This commit is contained in:
Marcin Strankowski
2022-04-20 14:39:30 +02:00
committed by GitHub
parent fb0be16155
commit af884cbb0e

View File

@@ -60,15 +60,15 @@ public class IntegrationFullTestsBulk2 extends IntegrationTest
ftpProtocol.authenticateUser(testUser1).usingSite(testSitePublic).createFolder(testFolder1) ftpProtocol.authenticateUser(testUser1).usingSite(testSitePublic).createFolder(testFolder1)
.usingResource(testFolder1).createFile(wordFile) .usingResource(testFolder1).createFile(wordFile)
.assertThat().contentIs("tasTesting"); .assertThat().contentIs("tasTesting");
STEP("2. Open document for edit using CMIS"); STEP("2. Open document for edit using CMIS");
cmisAPI.authenticateUser(testUser1).usingResource(wordFile).checkOut(); cmisAPI.authenticateUser(testUser1).usingResource(wordFile).checkOut();
FileModel wordFilePWC = cmisAPI.usingResource(wordFile).withCMISUtil().getPWCFileModel(); FileModel wordFilePWC = cmisAPI.usingResource(wordFile).withCMISUtil().getPWCFileModel();
STEP("3. Try to edit document using Webdav while checked-out with CMIS - content should be updated"); STEP("3. Try to edit document using Webdav while checked-out with CMIS - content should be updated");
webDavProtocol.authenticateUser(testUser1).usingResource(wordFilePWC).update("update") webDavProtocol.authenticateUser(testUser1).usingResource(wordFilePWC).update("update")
.and().assertThat().contentIs("update"); .and().assertThat().contentIs("update");
STEP("4. Copy document to testFolder2 with ftp"); STEP("4. Copy document to testFolder2 with ftp");
FileModel copiedWordFile = new FileModel(wordFile); FileModel copiedWordFile = new FileModel(wordFile);
ftpProtocol.usingSite(testSitePublic).createFolder(testFolder2) ftpProtocol.usingSite(testSitePublic).createFolder(testFolder2)
@@ -76,15 +76,15 @@ public class IntegrationFullTestsBulk2 extends IntegrationTest
copiedWordFile.setCmisLocation(ftpProtocol.getLastResourceWithoutPrefix()); copiedWordFile.setCmisLocation(ftpProtocol.getLastResourceWithoutPrefix());
ftpProtocol.usingResource(testFolder1).assertThat().hasFiles(wordFile) ftpProtocol.usingResource(testFolder1).assertThat().hasFiles(wordFile)
.and().usingResource(testFolder2).assertThat().hasFiles(copiedWordFile); .and().usingResource(testFolder2).assertThat().hasFiles(copiedWordFile);
STEP("5. Update document from folder2, check its content is updated with Webdav"); STEP("5. Update document from folder2, check its content is updated with Webdav");
webDavProtocol.usingResource(copiedWordFile).update("Step5") webDavProtocol.usingResource(copiedWordFile).update("Step5")
.and().assertThat().contentIs("Step5"); .and().assertThat().contentIs("Step5");
STEP("6. Update document with WebDAV"); STEP("6. Update document with WebDAV");
webDavProtocol.authenticateUser(testUser1).usingResource(wordFile).update("WebDAVUpdate"); webDavProtocol.authenticateUser(testUser1).usingResource(wordFile).update("WebDAVUpdate");
} }
/** /**
* Scenario 84 * Scenario 84
* 1. Create folder1 with webdav * 1. Create folder1 with webdav
@@ -150,7 +150,7 @@ public class IntegrationFullTestsBulk2 extends IntegrationTest
* 13. Check file is deleted with WebDAV * 13. Check file is deleted with WebDAV
*/ */
@Test(groups = { TestGroup.INTEGRATION, TestGroup.FULL }) @Test(groups = { TestGroup.INTEGRATION, TestGroup.FULL })
@TestRail(section = { TestGroup.INTEGRATION, TestGroup.CONTENT }, executionType = ExecutionType.REGRESSION, @TestRail(section = { TestGroup.INTEGRATION, TestGroup.CONTENT }, executionType = ExecutionType.REGRESSION,
description = "Update file with different user roles and protocols") description = "Update file with different user roles and protocols")
public void updateFileWithDifferentRolesUsingDifferentProtocols() throws Exception public void updateFileWithDifferentRolesUsingDifferentProtocols() throws Exception
{ {
@@ -268,55 +268,55 @@ public class IntegrationFullTestsBulk2 extends IntegrationTest
* 9. User2 deletes document1 * 9. User2 deletes document1
* 10. User1 tries to delete tag2 * 10. User1 tries to delete tag2
*/ */
// @Test(groups = { TestGroup.INTEGRATION, TestGroup.FULL }) @Test(groups = { TestGroup.INTEGRATION, TestGroup.FULL })
// @TestRail(section = { TestGroup.INTEGRATION, TestGroup.CONTENT, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION, description = "Check negative scenarios for tags") @TestRail(section = { TestGroup.INTEGRATION, TestGroup.CONTENT, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION, description = "Check negative scenarios for tags")
// public void tagsNegativeScenariosTest() throws Exception public void tagsNegativeScenariosTest() throws Exception
// { {
// STEP("1. Create user1, user2"); STEP("1. Create user1, user2");
// UserModel user1 = dataUser.createRandomTestUser(); UserModel user1 = dataUser.createRandomTestUser();
// UserModel user2 = dataUser.createRandomTestUser(); UserModel user2 = dataUser.createRandomTestUser();
// user2.setUserRole(UserRole.SiteManager); user2.setUserRole(UserRole.SiteManager);
//
// STEP("2. User1 creates site1 and invites user2 as manager"); STEP("2. User1 creates site1 and invites user2 as manager");
// SiteModel site = dataSite.usingUser(user1).createPublicRandomSite(); SiteModel site = dataSite.usingUser(user1).createPublicRandomSite();
// restAPI.authenticateUser(user1).withCoreAPI().usingSite(site).addPerson(user2); restAPI.authenticateUser(user1).withCoreAPI().usingSite(site).addPerson(user2);
//
// STEP("3. User1 adds document1 and tag1 to doc"); STEP("3. User1 adds document1 and tag1 to doc");
// dataContent.usingUser(user1).usingSite(site).createContent(testFile); dataContent.usingUser(user1).usingSite(site).createContent(testFile);
// RestTagModel tag = restAPI.withCoreAPI().usingResource(testFile).addTag("tag1"); RestTagModel tag = restAPI.withCoreAPI().usingResource(testFile).addTag("tag1");
// restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag1"); restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag1");
//
// STEP("4. User2 gets tags and verifies tag1 appears"); STEP("4. User2 gets tags and verifies tag1 appears");
// restAPI.authenticateUser(user2).withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag1"); restAPI.authenticateUser(user2).withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag1");
//
// STEP("5. User2 delete tag1"); STEP("5. User2 delete tag1");
// restAPI.withCoreAPI().usingResource(testFile).deleteTag(tag); restAPI.withCoreAPI().usingResource(testFile).deleteTag(tag);
// restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListDoesNotContain("tag", "tag1"); restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListDoesNotContain("tag", "tag1");
//
// STEP("6. User1 tries to update tag1"); STEP("6. User1 tries to update tag1");
// restAPI.authenticateUser(user2).withCoreAPI().usingTag(tag).update("updatedTag"); restAPI.authenticateUser(user2).withCoreAPI().usingTag(tag).update("updatedTag");
// restAPI.assertStatusCodeIs(HttpStatus.FORBIDDEN) restAPI.assertStatusCodeIs(HttpStatus.FORBIDDEN)
// .assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED) .assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED)
// .containsErrorKey(RestErrorModel.PERMISSION_DENIED_ERRORKEY); .containsErrorKey(RestErrorModel.PERMISSION_DENIED_ERRORKEY);
//
// STEP("7. User1 add new tag tag2"); STEP("7. User1 add new tag tag2");
// tag = restAPI.authenticateUser(user1).withCoreAPI().usingResource(testFile).addTag("tag2"); tag = restAPI.authenticateUser(user1).withCoreAPI().usingResource(testFile).addTag("tag2");
// restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag2"); restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag2");
//
// STEP("8. User2 verifies tag2 appears and tag1 is not in the list"); STEP("8. User2 verifies tag2 appears and tag1 is not in the list");
// restAPI.authenticateUser(user2).withCoreAPI().usingResource(testFile).getNodeTags() restAPI.authenticateUser(user2).withCoreAPI().usingResource(testFile).getNodeTags()
// .assertThat().entriesListDoesNotContain("tag", "tag1") .assertThat().entriesListDoesNotContain("tag", "tag1")
// .assertThat().entriesListContains("tag", "tag2"); .assertThat().entriesListContains("tag", "tag2");
//
// STEP("9. User2 deletes document1"); STEP("9. User2 deletes document1");
// dataContent.usingUser(user2).usingResource(testFile).deleteContent(); dataContent.usingUser(user2).usingResource(testFile).deleteContent();
//
// STEP("10. User1 tries to delete tag2"); STEP("10. User1 tries to delete tag2");
// restAPI.authenticateUser(user1).withCoreAPI().usingResource(testFile).deleteTag(tag); restAPI.authenticateUser(user1).withCoreAPI().usingResource(testFile).deleteTag(tag);
// restAPI.assertStatusCodeIs(HttpStatus.NOT_FOUND) restAPI.assertStatusCodeIs(HttpStatus.NOT_FOUND)
// .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, testFile.getNodeRefWithoutVersion())) .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, testFile.getNodeRefWithoutVersion()))
// .containsErrorKey(RestErrorModel.ENTITY_NOT_FOUND_ERRORKEY); .containsErrorKey(RestErrorModel.ENTITY_NOT_FOUND_ERRORKEY);
// } }
/** /**
* Scenario 83 * Scenario 83
@@ -329,9 +329,9 @@ public class IntegrationFullTestsBulk2 extends IntegrationTest
* 7. User1 deletes the document1 with ftp * 7. User1 deletes the document1 with ftp
* 8. Verify user2 cannot update document1 with cmis * 8. Verify user2 cannot update document1 with cmis
*/ */
@Test(groups = { TestGroup.INTEGRATION, TestGroup.FULL }, expectedExceptions = CmisObjectNotFoundException.class, expectedExceptionsMessageRegExp = ".*Object not found:.*") @Test(groups = { TestGroup.INTEGRATION, TestGroup.FULL }, expectedExceptions = CmisObjectNotFoundException.class, expectedExceptionsMessageRegExp = ".*Object not found:.*")
@TestRail(section = { TestGroup.INTEGRATION, TestGroup.CONTENT }, executionType = ExecutionType.REGRESSION, description = "Negative scenarios for update document") @TestRail(section = { TestGroup.INTEGRATION, TestGroup.CONTENT }, executionType = ExecutionType.REGRESSION, description = "Negative scenarios for update document")
public void fileUpdateNegativeScenariosTest() throws Exception public void fileUpdateNegativeScenariosTest() throws Exception
{ {
STEP("1. Create user1, user2"); STEP("1. Create user1, user2");
UserModel user1 = dataUser.createRandomTestUser(); UserModel user1 = dataUser.createRandomTestUser();