Search in sources :

Example 1 with NFSDataStorage

use of com.epam.pipeline.entity.datastorage.NFSDataStorage in project cloud-pipeline by epam.

the class DataStorageMapperTest method shouldMapNFSDataStorage.

@Test
void shouldMapNFSDataStorage() throws IOException {
    DataStorageMapper mapper = new DataStorageMapper(SearchDocumentType.NFS_STORAGE);
    NFSDataStorage dataStorage = new NFSDataStorage();
    fillStorage(dataStorage);
    DataStorageDoc doc = DataStorageDoc.builder().storage(dataStorage).build();
    XContentBuilder contentBuilder = mapper.map(buildContainer(doc));
    verifyNFSStorage(dataStorage, contentBuilder);
    verifyPermissions(PERMISSIONS_CONTAINER, contentBuilder);
    verifyMetadata(EXPECTED_METADATA, contentBuilder);
    verifyPipelineUser(USER, contentBuilder);
}
Also used : NFSDataStorage(com.epam.pipeline.entity.datastorage.NFSDataStorage) DataStorageDoc(com.epam.pipeline.elasticsearchagent.model.DataStorageDoc) XContentBuilder(org.elasticsearch.common.xcontent.XContentBuilder) Test(org.junit.jupiter.api.Test)

Aggregations

DataStorageDoc (com.epam.pipeline.elasticsearchagent.model.DataStorageDoc)1 NFSDataStorage (com.epam.pipeline.entity.datastorage.NFSDataStorage)1 XContentBuilder (org.elasticsearch.common.xcontent.XContentBuilder)1 Test (org.junit.jupiter.api.Test)1