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 {
|
|
|
|
|
2019-07-02 11:53:50 +02:00
|
|
|
private static String[] server={"mongo2-d-d4s.d4science.org","mongo3-d-d4s.d4science.org","mongo4-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(){
|
2019-07-02 11:53:50 +02:00
|
|
|
mongo=new MongoDB(server, "", "");
|
|
|
|
// mongo=new MongoDB(server, "", "");
|
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
|
|
|
}
|
|
|
|
|
2019-07-02 11:53:50 +02:00
|
|
|
// @Test
|
2014-06-09 10:10:13 +02:00
|
|
|
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
|
|
|
|
|
|
|
}
|