This commit is contained in:
parent
9625729264
commit
60e34f29ec
|
@ -34,7 +34,7 @@ namespace AC_OTE {
|
||||||
auto_ptr<SessionManager> manager(SessionManagerFactory::newInstance(&props));
|
auto_ptr<SessionManager> manager(SessionManagerFactory::newInstance(&props));
|
||||||
auto_ptr<Session> sess(SessionFactory::newInstance(&props));
|
auto_ptr<Session> sess(SessionFactory::newInstance(&props));
|
||||||
|
|
||||||
bool acTkInitialised = false, fatal = false, done = false;
|
bool acTkInitialised = false, fatal = false, done = false, transferGainer;
|
||||||
|
|
||||||
const char *thisRegistry="Donuts", *thatAccount="secura2-ote2", *thisAccount="secura1-ote";
|
const char *thisRegistry="Donuts", *thatAccount="secura2-ote2", *thisAccount="secura1-ote";
|
||||||
char *thisName;
|
char *thisName;
|
||||||
|
@ -44,28 +44,28 @@ namespace AC_OTE {
|
||||||
|
|
||||||
const string claims("claims"), dpml("custom"), landrush("landrush"), sunrise("sunrise");
|
const string claims("claims"), dpml("custom"), landrush("landrush"), sunrise("sunrise");
|
||||||
|
|
||||||
const std::string rrj("renjuan");
|
std::string ctc("renjuan");
|
||||||
const std::string rrjPW("Ab9dW@rd");
|
std::string ctcPW("Ab9dW@rd");
|
||||||
const std::string rrjEmail("juan@acm.org");
|
std::string ctcEmail("juan@acm.org");
|
||||||
const std::string rrjName("Ren Ren-Juan");
|
std::string ctcName("Ren Ren-Juan");
|
||||||
const std::string rrjCity("Niagara Falls");
|
std::string ctcCity("Niagara Falls");
|
||||||
const std::vector<std::string>
|
std::vector<std::string>
|
||||||
rrjCrib(1,"2926 2nd Strt");
|
ctcCrib(1,"2926 2nd Strt");
|
||||||
const std::string rrjProv("NY");
|
std::string ctcProv("NY");
|
||||||
const std::string rrjPC("14305");
|
std::string ctcPC("14305");
|
||||||
const std::string rrjGuo("US");
|
std::string ctcGuo("US");
|
||||||
const std::string rrjOrg("American Kybernetik");
|
std::string ctcOrg("American Kybernetik");
|
||||||
|
|
||||||
const std::string pw("Ab9dW@rd");
|
std::string pw("Ab9dW@rd");
|
||||||
const std::string RID("renjuan");
|
std::string RID("renjuan");
|
||||||
|
|
||||||
std::vector<std::string> tech(1,std::string("renjuan") );
|
std::vector<std::string> tech(1,std::string("renjuan") );
|
||||||
std::vector<std::string> admin(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> billing(1,std::string("renjuan") );
|
||||||
std::vector<std::string> ns(1,std::string("ns1.google.com") );;
|
std::vector<std::string> ns(1,std::string("ns1.google.com") );;
|
||||||
|
|
||||||
const IntPostalInfo rrjPO(rrjName,rrjOrg,
|
const IntPostalInfo ctcPO(ctcName,ctcOrg,
|
||||||
rrjCrib,rrjCity,rrjProv,rrjPC,rrjGuo);
|
ctcCrib,ctcCity,ctcProv,ctcPC,ctcGuo);
|
||||||
|
|
||||||
LPCrtCmdExtension crtE1( &claims ), crtE2( &dpml );
|
LPCrtCmdExtension crtE1( &claims ), crtE2( &dpml );
|
||||||
Transaction thisTest;
|
Transaction thisTest;
|
||||||
|
@ -163,7 +163,7 @@ namespace AC_OTE {
|
||||||
|
|
||||||
void createContact() {
|
void createContact() {
|
||||||
|
|
||||||
ContactCreateCommand oteCommand_0(rrj,rrjPW,&rrjPO,rrjEmail);
|
ContactCreateCommand oteCommand_0(ctc,ctcPW,&ctcPO,ctcEmail);
|
||||||
ContactCreateResponse oteResponse_0;
|
ContactCreateResponse oteResponse_0;
|
||||||
|
|
||||||
theseLogs->logN(1,"(skip) Create Contact(s).");
|
theseLogs->logN(1,"(skip) Create Contact(s).");
|
||||||
|
@ -185,29 +185,29 @@ namespace AC_OTE {
|
||||||
|
|
||||||
void dpmlCreate() { std::string dpmlName("face.dpml.zone");
|
void dpmlCreate() { std::string dpmlName("face.dpml.zone");
|
||||||
|
|
||||||
theseLogs->logN(2,"(%d) Create %s w ICANN SMD file.",++cmd,dpmlName.c_str());
|
theseLogs->logN(2,"(%d) Create %s w ICANN SMD file.",++cmd,dpmlName.c_str());
|
||||||
|
|
||||||
DomainCreateCommand oteCommand_7(dpmlName,pw,&RID, &tech, &ns, &admin, &billing);
|
DomainCreateCommand oteCommand_7(dpmlName,pw,&RID, &tech, &ns, &admin, &billing);
|
||||||
crtE2.setSMD();
|
crtE2.setSMD();
|
||||||
oteCommand_7.appendExtension(crtE2);
|
oteCommand_7.appendExtension(crtE2);
|
||||||
DomainCreateResponse oteResponse_7;
|
DomainCreateResponse oteResponse_7;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
thisTest = Transaction(&oteCommand_7, &oteResponse_7);
|
thisTest = Transaction(&oteCommand_7, &oteResponse_7);
|
||||||
manager->execute(thisTest);
|
manager->execute(thisTest);
|
||||||
}
|
}
|
||||||
catch (EPPException& e)
|
catch (EPPException& e)
|
||||||
{ const char *eMsg = e.getMessage().c_str();
|
{ const char *eMsg = e.getMessage().c_str();
|
||||||
const char *opNow = op.c_str();
|
const char *opNow = op.c_str();
|
||||||
theseLogs->logN(2,"EPP Exception during OTE B (%s): %s .",opNow,eMsg);
|
theseLogs->logN(2,"EPP Exception during OTEX (%s): %s .",opNow,eMsg);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
theseLogs->logN(1,"General Exception OTE B (%s).",op.c_str());
|
theseLogs->logN(1,"General ExceptionXE B (%s).",op.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sunriseCreate() {
|
void sunriseCreate() {
|
||||||
|
|
||||||
|
@ -234,12 +234,12 @@ namespace AC_OTE {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void transfer(bool &transferGainer) {
|
void transfer() {
|
||||||
|
|
||||||
DomainTransferRequestCommand
|
DomainTransferRequestCommand
|
||||||
oteCommand_4a(thisName,rrjPW);
|
oteCommand_4a(thisName,ctcPW);
|
||||||
DomainTransferApproveCommand
|
DomainTransferApproveCommand
|
||||||
oteCommand_4b(thisName,rrjPW);
|
oteCommand_4b(thisName,ctcPW);
|
||||||
DomainTransferResponse oteResponse_4;
|
DomainTransferResponse oteResponse_4;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -265,9 +265,35 @@ namespace AC_OTE {
|
||||||
theseFuncs["case02"] = checkClaims;
|
theseFuncs["case02"] = checkClaims;
|
||||||
theseFuncs["case03"] = create;
|
theseFuncs["case03"] = create;
|
||||||
theseFuncs["case05"] = createClaimOverride;
|
theseFuncs["case05"] = createClaimOverride;
|
||||||
|
theseFuncs["case04"] = sunriseCreate;
|
||||||
|
theseFuncs["case06"] = transfer;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool setupTestCase(Json::Value where) { // Set recognized variables, silently ignore others
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i=0;i<where.size();i++) {
|
||||||
|
|
||||||
|
thisName = (char *)where[i].get("name","missing").asString().c_str();
|
||||||
|
ctc = where[i].get("cont_id","renjuan").asString();
|
||||||
|
ctcPW = where[i].get("cont_pw","Ab9dW@rd").asString(); /*
|
||||||
|
ctcEmail = (char *)where[i].get("cont_email","juan@acm.org").asString();
|
||||||
|
ctcName = where[i].get("cont_name","Ren Ren-Juan").asString().c_str();
|
||||||
|
ctcCity = "Niagara Falls"
|
||||||
|
const std::vector<std::string>
|
||||||
|
ctcCrib = (1,"2926 2nd Street"
|
||||||
|
ctcProv = "NY"
|
||||||
|
ctcPC = "14305"
|
||||||
|
ctcGuo = "US"
|
||||||
|
ctcOrg = "American Kybernetik"
|
||||||
|
RID = "renjuan" */
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // AC_OTE
|
} // AC_OTE
|
||||||
|
|
||||||
using namespace AC_OTE;
|
using namespace AC_OTE;
|
||||||
|
@ -299,7 +325,7 @@ bool ausRegEPPTK::registryXOTE()
|
||||||
theseLogs->logN(0,"No logic to bind to '%s', need it.");
|
theseLogs->logN(0,"No logic to bind to '%s', need it.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
theseCases[AC_OTE::nCases].parms = &suite[i];
|
theseCases[AC_OTE::nCases].parms = &suite[i];
|
||||||
theseCases[AC_OTE::nCases].fBody = theseFuncs[thisItem];
|
theseCases[AC_OTE::nCases].fBody = theseFuncs[thisItem];
|
||||||
theseCases[AC_OTE::nCases++].caseName = thisItem;
|
theseCases[AC_OTE::nCases++].caseName = thisItem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@ public:
|
||||||
bool fatal;
|
bool fatal;
|
||||||
|
|
||||||
mdJSON (char *fileName);
|
mdJSON (char *fileName);
|
||||||
~mdJSON();
|
|
||||||
bool parse();
|
bool parse();
|
||||||
bool didDie() {return fatal;}
|
bool didDie() {return fatal;}
|
||||||
void die(){ fatal = true;}
|
void die(){ fatal = true;}
|
||||||
|
|
|
@ -99,15 +99,12 @@ bool mdJSON::parse()
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mdJSON::mdJSON(char *fileName) {
|
mdJSON::mdJSON(char *fileName) {
|
||||||
|
|
||||||
path = string(fileName);
|
//rrj path = string(fileName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mdJSON::~mdJSON() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue