2014-06-04 19:18:07 +02:00
|
|
|
package org.gcube.contentmanager.storageserver.store;
|
|
|
|
|
|
|
|
import org.junit.BeforeClass;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
public class MongoDBTest {
|
|
|
|
|
2015-10-14 11:48:30 +02:00
|
|
|
private static String[] server={"mongo1-d-d4s.d4science.org","mongo2-d-d4s.d4science.org","mongo3-d-d4s.d4science.org"};
|
2014-06-04 19:18:07 +02:00
|
|
|
private static MongoDB mongo;
|
|
|
|
|
2014-06-05 12:19:20 +02:00
|
|
|
@BeforeClass
|
2014-06-04 19:18:07 +02:00
|
|
|
public static void init(){
|
2015-10-14 11:48:30 +02:00
|
|
|
mongo=new MongoDB(server, "devUser", "d3v_u534");
|
2019-06-06 17:50:43 +02:00
|
|
|
// mongo=new MongoDB(server, "oplogger", "0pl0gg3r_d3v");
|
2014-06-04 19:18:07 +02:00
|
|
|
}
|
|
|
|
|
2014-06-09 10:10:13 +02:00
|
|
|
// @Test
|
|
|
|
public void update(){
|
2014-10-22 17:47:24 +02:00
|
|
|
StorageStatusObject ssr=new StorageStatusObject("test.consumer", 100, 1);
|
2014-10-22 12:38:13 +02:00
|
|
|
mongo.updateUserVolume(ssr, "UPLOAD");
|
2014-06-04 19:18:07 +02:00
|
|
|
}
|
|
|
|
|
2014-06-09 10:10:13 +02:00
|
|
|
@Test
|
|
|
|
public void put(){
|
2015-07-29 15:02:19 +02:00
|
|
|
new StorageStatusOperationManager(mongo.getStorageStatusCollection()).putSSRecord( "test.consumer2", 100, 1);
|
2014-06-09 10:10:13 +02:00
|
|
|
}
|
2014-06-04 19:18:07 +02:00
|
|
|
|
|
|
|
}
|