Search in sources :

Example 1 with MockS3Helper

use of com.epam.pipeline.manager.MockS3Helper in project cloud-pipeline by epam.

the class DataStorageManagerTest method setUp.

@Before
public void setUp() {
    doReturn(new MockS3Helper()).when(storageProviderManager).getS3Helper(any());
    Preference systemIndependentBlackList = SystemPreferences.DATA_STORAGE_NFS_MOUNT_BLACK_LIST.toPreference();
    systemIndependentBlackList.setValue(Arrays.asList(SystemPreferences.DATA_STORAGE_NFS_MOUNT_BLACK_LIST.getDefaultValue().split(",")).stream().map(p -> Paths.get(p).toString()).collect(Collectors.joining(",")));
    preferenceManager.update(Collections.singletonList(systemIndependentBlackList));
}
Also used : Preference(com.epam.pipeline.entity.preference.Preference) MockS3Helper(com.epam.pipeline.manager.MockS3Helper) Before(org.junit.Before)

Example 2 with MockS3Helper

use of com.epam.pipeline.manager.MockS3Helper in project cloud-pipeline by epam.

the class FolderManagerTest method setUp.

@Before
public void setUp() throws Exception {
    awsRegionManager.create(AwsRegionVO.builder().name("US").awsRegionName("us-east-1").isDefault(true).build());
    doReturn(new MockS3Helper()).when(storageProviderManager).getS3Helper(any());
    folder = new Folder();
    folder.setName(TEST_NAME);
    subFolder = new Folder();
    subFolder.setName(TEST_NAME_1);
    MockitoAnnotations.initMocks(this);
    when(gitManagerMock.getPipelineRevisions(any(Pipeline.class), any(Long.class))).thenReturn(Collections.emptyList());
    pipelineManager.setGitManager(gitManagerMock);
}
Also used : Folder(com.epam.pipeline.entity.pipeline.Folder) MockS3Helper(com.epam.pipeline.manager.MockS3Helper) Pipeline(com.epam.pipeline.entity.pipeline.Pipeline) Before(org.junit.Before)

Example 3 with MockS3Helper

use of com.epam.pipeline.manager.MockS3Helper in project cloud-pipeline by epam.

the class FolderTemplateManagerTest method setUp.

@Before
public void setUp() throws Exception {
    doReturn(new MockS3Helper()).when(storageProviderManager).getS3Helper(any());
    awsRegion = new AwsRegion();
    awsRegion.setName("US");
    awsRegion.setAwsRegionName("us-east-1");
    awsRegion.setDefault(true);
    awsRegionDao.create(awsRegion);
    AclTestDao.AclSid testUserSid = new AclTestDao.AclSid(true, TEST_USER);
    aclTestDao.createAclSid(testUserSid);
    AclTestDao.AclSid testRole = new AclTestDao.AclSid(false, TEST_ROLE);
    aclTestDao.createAclSid(testRole);
    AclTestDao.AclClass folderAclClass = new AclTestDao.AclClass(Folder.class.getCanonicalName());
    aclTestDao.createAclClassIfNotPresent(folderAclClass);
}
Also used : AwsRegion(com.epam.pipeline.entity.region.AwsRegion) AclTestDao(com.epam.pipeline.dao.util.AclTestDao) Folder(com.epam.pipeline.entity.pipeline.Folder) AclClass(com.epam.pipeline.entity.security.acl.AclClass) MockS3Helper(com.epam.pipeline.manager.MockS3Helper) Before(org.junit.Before)

Aggregations

MockS3Helper (com.epam.pipeline.manager.MockS3Helper)3 Before (org.junit.Before)3 Folder (com.epam.pipeline.entity.pipeline.Folder)2 AclTestDao (com.epam.pipeline.dao.util.AclTestDao)1 Pipeline (com.epam.pipeline.entity.pipeline.Pipeline)1 Preference (com.epam.pipeline.entity.preference.Preference)1 AwsRegion (com.epam.pipeline.entity.region.AwsRegion)1 AclClass (com.epam.pipeline.entity.security.acl.AclClass)1