This commit is contained in:
parent
0d764d3d2d
commit
712f5e7707
|
@ -22,7 +22,7 @@
|
|||
#include <mdLogger.h>
|
||||
|
||||
const char *otePeer="epp.ote.donuts.co";
|
||||
int tkScenario=0;
|
||||
int tkScenario=0;
|
||||
mdLogger mdLog;
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -3,9 +3,13 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#ifndef AC_MD
|
||||
|
||||
char *userLogPath = "./logs/";
|
||||
int tkDebugThreshold = 9999999999;
|
||||
|
||||
#endif
|
||||
|
||||
void init(const std::string &system_props_file);
|
||||
void scenario(int which,const std::string &system_props_file);
|
||||
|
||||
|
|
|
@ -42,13 +42,13 @@ ACSession::~ACSession()
|
|||
|
||||
void ACSession::run() {
|
||||
|
||||
mdLog.logN(0,"Begin Toolkit Scenario %d Session",tkScenario);
|
||||
mdLog.logN(1,"Begin Toolkit Scenario %d Session",tkScenario);
|
||||
SessionManagerImpl::run();
|
||||
}
|
||||
|
||||
void ACSession::shutdown() {
|
||||
|
||||
SessionManagerImpl::shutdown();
|
||||
mdLog.logN(0,"End Toolkit Scenario %d Session",tkScenario);
|
||||
mdLog.logN(1,"End Toolkit Scenario %d Session",tkScenario);
|
||||
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ void SessionPoolImpl::init()
|
|||
|
||||
long SessionPoolImpl::keepAlive() throw (EPPIOException)
|
||||
{
|
||||
debugLogger->LOG_FINEST("enter");
|
||||
//debugLogger->LOG_FINEST("enter");
|
||||
|
||||
for (PoolIter session = pool.begin(); session != pool.end(); ++session)
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ long SessionPoolImpl::keepAlive() throw (EPPIOException)
|
|||
(*session)->keepAlive();
|
||||
}
|
||||
}
|
||||
debugLogger->LOG_FINEST("exit");
|
||||
//debugLogger->LOG_FINEST("exit");
|
||||
return pollInterval;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,14 +64,14 @@ SLIBS= -L/usr/lib $(BOSTLIB) $(LOG4LIB) $(ARTKLIB) -l boost_system -l boost_thre
|
|||
DLIBS= -L/usr/lib $(BOSTLIB) $(LOG4LIB) $(ARTKLIB) -l boost_system -l boost_thread -l log4cpp
|
||||
|
||||
SINCL= -I include -I /usr/include/log4cpp $(BOSINCL)
|
||||
CFLAGS= -DCURRENT_DEBUG=1000 -ggdb3 -DARTKENABLED=$(ARTKENABLED)
|
||||
CFLAGS= -DCURRENT_DEBUG=1000 -ggdb3 -DARTKENABLED=$(ARTKENABLED) -DAC_MD
|
||||
|
||||
#
|
||||
# ---------- Should not need to change below
|
||||
#
|
||||
CLIBS= -L$(USRLIB)
|
||||
|
||||
CLFLAGS= -Wall -Wundef -Wpointer-arith -Wshadow \
|
||||
CLFLAGS= -Wall -Wundef -Wpointer-arith -Wshadow \
|
||||
-Wcast-align -Winline -Wmissing-declarations -Wredundant-decls \
|
||||
-Wmissing-prototypes -Wnested-externs \
|
||||
-Wstrict-prototypes -Waggregate-return -Wno-implicit
|
||||
|
|
Binary file not shown.
|
@ -2,6 +2,7 @@
|
|||
#include "cliever-md.h"
|
||||
#include "session/SessionFactory.hpp"
|
||||
#include "session/SessionManagerProperties.hpp"
|
||||
#include "session/Transaction.hpp"
|
||||
#include "common/SystemProperties.hpp"
|
||||
#include "session/Session.hpp"
|
||||
#include "session/StatsManager.hpp"
|
||||
|
@ -9,15 +10,27 @@
|
|||
#include "se/DomainCheckResponse.hpp"
|
||||
#include "OTE/LPECheckCommand.hpp"
|
||||
#include "OTE/LPECheckResponse.hpp"
|
||||
#include "se/TransferOp.hpp"
|
||||
#include "se/PostalInfo.hpp"
|
||||
#include "se/ContactCreateCommand.hpp"
|
||||
#include "se/ContactCreateResponse.hpp"
|
||||
#include "se/DomainCreateCommand.hpp"
|
||||
#include "se/DomainCreateResponse.hpp"
|
||||
#include "se/DomainRegistrantTransferCommand.hpp"
|
||||
#include "se/DomainRegistrantTransferResponse.hpp"
|
||||
#include "se/DomainTransferCommand.hpp"
|
||||
#include "se/DomainTransferResponse.hpp"
|
||||
#include "OTE/LPECreateCommand.hpp"
|
||||
#include "OTE/LPECreateResponse.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class RRJPI : public PostalInfo {
|
||||
public:
|
||||
RRJPI(const PostalInfoType *type,const string& name, const string& org,
|
||||
const std::vector<std::string>& street, const string& city,
|
||||
const string& state,const string& pc, const string& guo)
|
||||
: PostalInfo (type, name, org, street, city, state, pc, guo) { };
|
||||
};
|
||||
|
||||
static TestEnvironment props;
|
||||
|
||||
static std::string TEST_SE =
|
||||
|
@ -83,12 +96,14 @@ void ausRegEPPTK::doOTEA()
|
|||
}
|
||||
}
|
||||
void ausRegEPPTK::doOTEB()
|
||||
{
|
||||
{ bool debug=true;
|
||||
int cmd=0,thisAccount=0;
|
||||
string op("newInstance");
|
||||
Transaction thisTest;
|
||||
|
||||
scenario(tkScenario,thisConfig->cfg_path);
|
||||
scenario(thisConfig->tkScenario,thisConfig->cfg_path);
|
||||
|
||||
while(debug) { debug=false; // debugger needs this
|
||||
try {
|
||||
Timer::setTime("20140101.010101");
|
||||
auto_ptr<SessionManager> manager(SessionManagerFactory::newInstance(&props));
|
||||
|
@ -103,49 +118,127 @@ void ausRegEPPTK::doOTEB()
|
|||
theseLogs->logN(1,"OTE Basic Access [Hello] (%d).",cmd++);
|
||||
sess->writeXML(TEST_SE);
|
||||
sess->read();
|
||||
theseLogs->logN(1,"Begin Actual Tests.");
|
||||
sleep(2);
|
||||
theseLogs->logN(1,"(%d) Conventional check of thoughtcrime.biz",cmd++);
|
||||
|
||||
DomainCheckCommand baCommand_1("thoughtcrime.biz");
|
||||
theseLogs->logN(1,"OTE Basic Access Setup (%d).",cmd++);
|
||||
|
||||
const PostalInfoType *pits=new PostalInfoType(string("int"));
|
||||
|
||||
const std::string rrj("renjuan");
|
||||
const std::string rrjPW("Ab9dW@rd");
|
||||
const std::string rrjEmail("juan@acm.org");
|
||||
const std::string rrjName("Ren Ren-Juan");
|
||||
const std::string rrjCity("Niagara Falls");
|
||||
const std::vector<std::string>
|
||||
rrjCrib(1,"2926 2nd Strt");
|
||||
const std::string rrjProv("NY");
|
||||
const std::string rrjPC("14305");
|
||||
const std::string rrjGuo("US");
|
||||
const std::string rrjOrg("American Kybernetik");
|
||||
|
||||
const RRJPI rrjPO(pits,rrjName,rrjOrg,
|
||||
rrjCrib,rrjCity,rrjProv,rrjPC,rrjGuo);
|
||||
|
||||
ContactCreateCommand baCommand_0(rrj,rrjPW,&rrjPO,rrjEmail);
|
||||
ContactCreateResponse baResponse_0;
|
||||
|
||||
try {
|
||||
thisTest = Transaction(&baCommand_0, &baResponse_0);
|
||||
manager->execute(thisTest);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
theseLogs->logN(1,"Case %d Failed, harness catch.",cmd++);
|
||||
}
|
||||
|
||||
theseLogs->logN(1,"Begin Basic Access OTE Transactions.");
|
||||
sleep(2);
|
||||
theseLogs->logN(1,"(%d) Conventional check of yoda.guru",cmd++);
|
||||
|
||||
DomainCheckCommand baCommand_1("yoda.guru");
|
||||
DomainCheckResponse baResponse_1;
|
||||
|
||||
theseLogs->logN(1,"(%d) LPE Check of test-validate.claimsgasix",cmd++);
|
||||
try {
|
||||
thisTest = Transaction(&baCommand_1, &baResponse_1);
|
||||
manager->execute(thisTest);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
theseLogs->logN(0,"Case %d Failed, harness catch.",cmd++);
|
||||
}
|
||||
|
||||
LPECheckCommand baCommand_2("test-validate.claimsgasix");
|
||||
theseLogs->logN(1,"(%d) LPE Check of pricey.holdings",cmd++);
|
||||
|
||||
LPECheckCommand baCommand_2("pricey.holdings");
|
||||
LPECheckResponse baResponse_2;
|
||||
|
||||
theseLogs->logN(2,"(%d) Register <registrar>.ote using OTE Account %d.",cmd++,
|
||||
thisAccount++);
|
||||
thisTest = Transaction(&baCommand_2, &baResponse_2);
|
||||
manager->execute(thisTest);
|
||||
|
||||
const std::string pw("password");
|
||||
const std::string RID("registrantID");
|
||||
const std::string pw("Ab9dW@rd");
|
||||
const std::string RID("renjuan");
|
||||
std::vector<std::string> tech(1,std::string("renjuan") );
|
||||
std::vector<std::string> admin(1,std::string("renjuan") );
|
||||
std::vector<std::string> billing(1,std::string("renjuan") );
|
||||
std::vector<std::string> ns(1,std::string("ns1.google.com") );;
|
||||
|
||||
DomainCreateCommand baCommand_3("secura1.ote",pw,&RID);
|
||||
// admin.push_back(std::string("Administration"));
|
||||
// tech.push_back(std::string("Technical"));
|
||||
// billing.push_back(std::string("Billing"));
|
||||
// ns.push_back(std::string("ns1.google.com"));
|
||||
|
||||
try { theseLogs->logN(2,"(%d) Try creating bestever.camera using OTE %d.",cmd++,
|
||||
thisAccount++);
|
||||
|
||||
DomainCreateCommand baCommand_3("bestever.camera",pw,&RID,
|
||||
&tech, &ns, &admin, &billing);
|
||||
DomainCreateResponse baResponse_3;
|
||||
|
||||
thisTest = Transaction(&baCommand_3, &baResponse_3);
|
||||
manager->execute(thisTest);
|
||||
|
||||
theseLogs->logN(2,"(%d) Transfer <registrar>.ote to OTE Account %d.",cmd++,
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
theseLogs->logN(0,"Case %d Failed, harness catch.",cmd++);
|
||||
}
|
||||
|
||||
|
||||
theseLogs->logN(2,"(%d) Transfer bestever.camera to OTE Account %d.",cmd++,
|
||||
thisAccount++);
|
||||
|
||||
const XMLGregorianCalendar curExpDate;
|
||||
const std::string kvListName;
|
||||
const std::string explanation;
|
||||
const TransferOp *thisTransfer = new TransferOp("request");
|
||||
|
||||
DomainRegistrantTransferCommand
|
||||
baCommand_4("secura1.ote",curExpDate,kvListName,explanation);
|
||||
DomainRegistrantTransferResponse baResponse_4;
|
||||
DomainTransferCommand
|
||||
baCommand_4(thisTransfer,"bestever.camera");
|
||||
DomainTransferResponse baResponse_4;
|
||||
|
||||
theseLogs->logN(1,"(%d) Sunrise create with ICANN SMD test files.",cmd++);
|
||||
try {
|
||||
|
||||
LPECreateCommand baCommand_5("test-validate.claimsgasix",pw,&RID);
|
||||
thisTest = Transaction(&baCommand_4, &baResponse_4);
|
||||
manager->execute(thisTest);
|
||||
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
theseLogs->logN(0,"Case %d Failed, harness catch.",cmd++);
|
||||
}
|
||||
|
||||
theseLogs->logN(1,"(%d) Sunrise create bestever.camera with ICANN SMD test files.",cmd++);
|
||||
|
||||
LPECreateCommand baCommand_5("bestever.camera",pw,&RID);
|
||||
LPECreateResponse baResponse_5;
|
||||
|
||||
theseLogs->logN(1,"(%d) Attempt create subject to claims.",cmd++);
|
||||
thisTest = Transaction(&baCommand_5, &baResponse_5);
|
||||
manager->execute(thisTest);
|
||||
|
||||
theseLogs->logN(1,"(%d) Create test-validate.claimsgasix (TCN).",cmd++);
|
||||
|
||||
LPECreateCommand baCommand_6("test-validate.claimsgasix",pw,&RID);
|
||||
LPECreateResponse baResponse_6;
|
||||
|
||||
thisTest = Transaction(&baCommand_6, &baResponse_6);
|
||||
manager->execute(thisTest);
|
||||
|
||||
theseLogs->logN(1,"End OTE Basic Access Tests.",cmd++);
|
||||
|
||||
sess->close();
|
||||
|
@ -163,6 +256,7 @@ void ausRegEPPTK::doOTEB()
|
|||
theseLogs->logN(2,"General Exception during OTE B (%s).",op.c_str());
|
||||
}
|
||||
|
||||
}// debug while
|
||||
}
|
||||
|
||||
void ausRegEPPTK::doOTEP()
|
||||
|
|
Loading…
Reference in New Issue