This commit is contained in:
parent
7c140f266b
commit
709fedf6bf
|
@ -26,7 +26,7 @@ namespace AC_OTE {
|
||||||
const char *thisRegistry="Donuts", *thatAccount="secura2-ote2", *thisAccount="secura1-ote";
|
const char *thisRegistry="Donuts", *thatAccount="secura2-ote2", *thisAccount="secura1-ote";
|
||||||
char *thisName;
|
char *thisName;
|
||||||
|
|
||||||
int cmd=0;
|
int cmd=0,debug=1000;
|
||||||
string op("newInstance");
|
string op("newInstance");
|
||||||
|
|
||||||
const string claims("claims"), dpml("custom"), landrush("landrush"), sunrise("sunrise");
|
const string claims("claims"), dpml("custom"), landrush("landrush"), sunrise("sunrise");
|
||||||
|
@ -37,7 +37,7 @@ namespace AC_OTE {
|
||||||
std::string ctcName("Ren Ren-Juan");
|
std::string ctcName("Ren Ren-Juan");
|
||||||
std::string ctcCity("Niagara Falls");
|
std::string ctcCity("Niagara Falls");
|
||||||
std::vector<std::string>
|
std::vector<std::string>
|
||||||
ctcCrib(1,"2926 2nd Strt");
|
ctcCrib(1,"2926 2nd Strt");
|
||||||
std::string ctcProv("NY");
|
std::string ctcProv("NY");
|
||||||
std::string ctcPC("14305");
|
std::string ctcPC("14305");
|
||||||
std::string ctcGuo("US");
|
std::string ctcGuo("US");
|
||||||
|
@ -55,118 +55,71 @@ namespace AC_OTE {
|
||||||
ctcCrib,ctcCity,ctcProv,ctcPC,ctcGuo);
|
ctcCrib,ctcCity,ctcProv,ctcPC,ctcGuo);
|
||||||
|
|
||||||
LPCrtCmdExtension crtE1( &claims ), crtE2( &dpml );
|
LPCrtCmdExtension crtE1( &claims ), crtE2( &dpml );
|
||||||
Transaction thisTest;
|
Transaction *thisTest;
|
||||||
|
|
||||||
void check() {
|
void check() {
|
||||||
|
|
||||||
theseLogs->logN(2,"(%d) Unextended check of %s",cmd++,thisName);
|
theseLogs->logN(2,"Queue (%d) Unextended check of %s",cmd++,thisName);
|
||||||
|
|
||||||
DomainCheckCommand oteCommand_1(thisName);
|
DomainCheckCommand *c = new DomainCheckCommand(thisName);
|
||||||
DomainCheckResponse oteResponse_1;
|
DomainCheckResponse *r = new DomainCheckResponse();
|
||||||
|
|
||||||
try {
|
thisTest = new Transaction(c, r);
|
||||||
thisTest = Transaction(&oteCommand_1, &oteResponse_1);
|
acq.push(thisTest);
|
||||||
ac_mgr->execute(thisTest);
|
|
||||||
}
|
|
||||||
catch(...)
|
|
||||||
{
|
|
||||||
theseLogs->logN(0,"Case %d Failed, fatal to suite.",cmd++);
|
|
||||||
fatal = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkClaims() {
|
void checkClaims() {
|
||||||
|
|
||||||
theseLogs->logN(2,"(%d) Perform Claims type Check of %s",cmd++,thisName);
|
theseLogs->logN(2,"(%d) Queue Claims type Check of %s",cmd++,thisName);
|
||||||
|
|
||||||
DomainCheckCommand oteCommand_2(thisName);
|
DomainCheckCommand *c = new DomainCheckCommand(thisName);
|
||||||
LPChkCmdExtension chkE(&claims);
|
LPChkCmdExtension chkE(&claims);
|
||||||
oteCommand_2.appendExtension(chkE);
|
c->appendExtension(chkE);
|
||||||
DomainCheckResponse oteResponse_2;
|
DomainCheckResponse *r = new DomainCheckResponse();
|
||||||
LPChkRespExtension chkRspE;
|
LPChkRespExtension chkRspE;
|
||||||
oteResponse_2.registerExtension(&chkRspE);
|
r->registerExtension(&chkRspE);
|
||||||
|
|
||||||
try {
|
thisTest = new Transaction(c, r);
|
||||||
thisTest = Transaction(&oteCommand_2, &oteResponse_2);
|
acq.push(thisTest);
|
||||||
ac_mgr->execute(thisTest);
|
|
||||||
theseLogs->logN(3,"(%d) Claims %s exist for %s.",
|
|
||||||
cmd,(chkRspE.doClaimsExist() ? "do" : " do not "),thisName);
|
|
||||||
if (chkRspE.doClaimsExist())
|
|
||||||
theseLogs->logN(3,"(%d) claim: %s .",cmd,chkRspE.getClaimsKey());
|
|
||||||
}
|
|
||||||
catch (EPPException& e)
|
|
||||||
{ const char *eMsg = e.getMessage().c_str();
|
|
||||||
const char *opNow = op.c_str();
|
|
||||||
theseLogs->logN(2,"EPP Exception during OTE (%s): %s .",opNow,eMsg);
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
theseLogs->logN(1,"General Exception OTE B (%s).",op.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void create() {
|
void create() {
|
||||||
|
|
||||||
theseLogs->logN(3," (%d) normal create %s in OTE %s.",cmd++, thisName, thisAccount);
|
theseLogs->logN(3," (%d) normal create %s in OTE %s.",cmd++, thisName, thisAccount);
|
||||||
DomainCreateCommand
|
DomainCreateCommand *c = new DomainCreateCommand(thisName,pw,&RID, &tech, &ns, &admin, &billing);
|
||||||
oteCommand_3(thisName,pw,&RID, &tech, &ns, &admin, &billing);
|
DomainCreateResponse *r = new DomainCreateResponse();
|
||||||
DomainCreateResponse oteResponse_3;
|
|
||||||
thisTest = Transaction(&oteCommand_3, &oteResponse_3);
|
thisTest = new Transaction(c, r);
|
||||||
ac_mgr->execute(thisTest);
|
acq.push(thisTest);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string noticeID("d85159710000000000000008692"),
|
||||||
|
notAfter("2015-01-01T12:00:00Z"), acceptedDate("2014-01-27T19:00:00Z");
|
||||||
|
|
||||||
void createClaimOverride() {
|
void createClaimOverride() {
|
||||||
|
|
||||||
theseLogs->logN(2,"(%d) Create %s w Notice ID test data (TCN).",++cmd,thisName);
|
theseLogs->logN(2,"(%d) Create %s w Notice ID test data (TCN).",++cmd,thisName);
|
||||||
|
|
||||||
string noticeID("d85159710000000000000008692"),
|
DomainCreateCommand *c = new DomainCreateCommand(thisName,pw,&RID, &tech, &ns, &admin, &billing);
|
||||||
notAfter("2015-01-01T12:00:00Z"), acceptedDate("2014-01-27T19:00:00Z");
|
|
||||||
|
|
||||||
DomainCreateCommand oteCommand_6(thisName,pw,&RID, &tech, &ns, &admin, &billing);
|
|
||||||
crtE1.setNoticeID(noticeID, notAfter, acceptedDate);
|
crtE1.setNoticeID(noticeID, notAfter, acceptedDate);
|
||||||
oteCommand_6.appendExtension(crtE1);
|
c->appendExtension(crtE1);
|
||||||
DomainCreateResponse oteResponse_6;
|
DomainCreateResponse *r;
|
||||||
|
|
||||||
try {
|
|
||||||
thisTest = Transaction(&oteCommand_6, &oteResponse_6);
|
|
||||||
ac_mgr->execute(thisTest);
|
|
||||||
}
|
|
||||||
catch (EPPException& e)
|
|
||||||
{ const char *eMsg = e.getMessage().c_str();
|
|
||||||
const char *opNow = op.c_str();
|
|
||||||
theseLogs->logN(2,"EPP Exception during OTE B (%s): %s .",opNow,eMsg);
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
theseLogs->logN(1,"General Exception OTE B (%s).",op.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
thisTest = new Transaction(c, r);
|
||||||
|
acq.push(thisTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
void createContact() {
|
void createContact() {
|
||||||
|
|
||||||
ContactCreateCommand oteCommand_0(ctc,ctcPW,&ctcPO,ctcEmail);
|
theseLogs->logN(0,"Create a Contact.");
|
||||||
ContactCreateResponse oteResponse_0;
|
ContactCreateCommand *c = new ContactCreateCommand(ctc,ctcPW,&ctcPO,ctcEmail);
|
||||||
|
ContactCreateResponse *r = new ContactCreateResponse();
|
||||||
|
|
||||||
theseLogs->logN(1,"(skip) Create Contact(s).");
|
thisTest = new Transaction(c, r);
|
||||||
|
acq.push(thisTest);
|
||||||
try {
|
|
||||||
thisTest = Transaction(&oteCommand_0, &oteResponse_0);
|
|
||||||
ac_mgr->execute(thisTest);
|
|
||||||
}
|
|
||||||
catch(const std::exception e)
|
|
||||||
{
|
|
||||||
theseLogs->logN(1,"Case %d: %s.",cmd++,e.what());
|
|
||||||
}
|
|
||||||
catch(...)
|
|
||||||
{
|
|
||||||
theseLogs->logN(1,"Case %d Failed, harness catch.",cmd++);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,25 +127,13 @@ namespace AC_OTE {
|
||||||
|
|
||||||
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 *c = new DomainCreateCommand(dpmlName,pw,&RID, &tech, &ns, &admin, &billing);
|
||||||
crtE2.setSMD();
|
crtE2.setSMD();
|
||||||
oteCommand_7.appendExtension(crtE2);
|
c->appendExtension(crtE2);
|
||||||
DomainCreateResponse oteResponse_7;
|
DomainCreateResponse *r = new DomainCreateResponse();
|
||||||
|
|
||||||
try {
|
thisTest = new Transaction(c, r);
|
||||||
thisTest = Transaction(&oteCommand_7, &oteResponse_7);
|
acq.push(thisTest);
|
||||||
ac_mgr->execute(thisTest);
|
|
||||||
}
|
|
||||||
catch (EPPException& e)
|
|
||||||
{ const char *eMsg = e.getMessage().c_str();
|
|
||||||
const char *opNow = op.c_str();
|
|
||||||
theseLogs->logN(2,"EPP Exception during OTEX (%s): %s .",opNow,eMsg);
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
theseLogs->logN(1,"General ExceptionXE B (%s).",op.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,48 +141,26 @@ namespace AC_OTE {
|
||||||
|
|
||||||
theseLogs->logN(2,"(%d) Sunrise create %s with ICANN SMD test data.",++cmd,thisName);
|
theseLogs->logN(2,"(%d) Sunrise create %s with ICANN SMD test data.",++cmd,thisName);
|
||||||
|
|
||||||
DomainCreateCommand oteCommand_5(thisName,pw,&RID, &tech, &ns, &admin, &billing);
|
DomainCreateCommand *c = new DomainCreateCommand(thisName,pw,&RID, &tech, &ns, &admin, &billing);
|
||||||
oteCommand_5.appendExtension(crtE1);
|
c->appendExtension(crtE1);
|
||||||
DomainCreateResponse oteResponse_5;
|
DomainCreateResponse *r = new DomainCreateResponse();
|
||||||
|
|
||||||
try {
|
thisTest = new Transaction(c, r);
|
||||||
thisTest = Transaction(&oteCommand_5, &oteResponse_5);
|
acq.push(thisTest);
|
||||||
ac_mgr->execute(thisTest);
|
|
||||||
}
|
|
||||||
catch (EPPException& e)
|
|
||||||
{ const char *eMsg = e.getMessage().c_str();
|
|
||||||
const char *opNow = op.c_str();
|
|
||||||
theseLogs->logN(2,"EPP Exception during OTE B (%s): %s .",opNow,eMsg);
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
theseLogs->logN(1,"General Exception OTE B (%s).",op.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void transfer() {
|
void transfer() {
|
||||||
|
|
||||||
DomainTransferRequestCommand
|
DomainTransferRequestCommand *c0 = new DomainTransferRequestCommand(thisName,ctcPW);
|
||||||
oteCommand_4a(thisName,ctcPW);
|
DomainTransferApproveCommand *c1 = new DomainTransferApproveCommand(thisName,ctcPW);
|
||||||
DomainTransferApproveCommand
|
DomainTransferResponse *r = new DomainTransferResponse();
|
||||||
oteCommand_4b(thisName,ctcPW);
|
|
||||||
DomainTransferResponse oteResponse_4;
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
theseLogs->logN(4," %s (%d) %s -> %s.", (transferGainer ? "Request" : "Approve") ,cmd++, thisName,thatAccount);
|
theseLogs->logN(4," %s (%d) %s -> %s.", (transferGainer ? "Request" : "Approve") ,cmd++, thisName,thatAccount);
|
||||||
|
|
||||||
thisTest = transferGainer ? Transaction(&oteCommand_4a, &oteResponse_4) :
|
thisTest = transferGainer ? new Transaction(c0, r) : new Transaction(c1, r) ;
|
||||||
Transaction(&oteCommand_4b, &oteResponse_4) ;
|
|
||||||
ac_mgr->execute(thisTest);
|
|
||||||
|
|
||||||
}
|
acq.push(thisTest);
|
||||||
catch(...)
|
|
||||||
{
|
|
||||||
theseLogs->logN(0,"Case %d Failed, non fatal.",cmd++);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // transfer
|
} // transfer
|
||||||
|
|
||||||
|
@ -251,36 +170,14 @@ namespace AC_OTE {
|
||||||
theseFuncs["case01"] = check;
|
theseFuncs["case01"] = check;
|
||||||
theseFuncs["case02"] = checkClaims;
|
theseFuncs["case02"] = checkClaims;
|
||||||
theseFuncs["case03"] = create;
|
theseFuncs["case03"] = create;
|
||||||
theseFuncs["case05"] = createClaimOverride;
|
|
||||||
theseFuncs["case04"] = sunriseCreate;
|
theseFuncs["case04"] = sunriseCreate;
|
||||||
|
theseFuncs["case05"] = createClaimOverride;
|
||||||
theseFuncs["case06"] = transfer;
|
theseFuncs["case06"] = transfer;
|
||||||
|
|
||||||
theseLogs->logN(0,"7 test cases bound");
|
theseLogs->logN(0,"7 test case backends available for scripting");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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 namespace
|
} // AC_OTE namespace
|
||||||
#endif /* REGISTRY_X */
|
#endif /* REGISTRY_X */
|
||||||
|
|
|
@ -293,7 +293,6 @@ void ausRegEPPTK::doOTEB()
|
||||||
{
|
{
|
||||||
theseLogs->logN(1,"General Exception OTE B (%s).",op.c_str());
|
theseLogs->logN(1,"General Exception OTE B (%s).",op.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
theseLogs->logN(0,"End OTE Session.");
|
theseLogs->logN(0,"End OTE Session.");
|
||||||
|
|
|
@ -237,6 +237,11 @@ void ausRegEPPTK::doPROD()
|
||||||
|
|
||||||
if (!acq.empty()) { idleSeconds = 0;
|
if (!acq.empty()) { idleSeconds = 0;
|
||||||
|
|
||||||
|
Transaction *tx = acq.top();
|
||||||
|
manager->execute(*tx);
|
||||||
|
acq.pop();
|
||||||
|
delete tx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idleSeconds >= (857 - PRODINOTESLEEP)) { idleSeconds = 0;
|
if (idleSeconds >= (857 - PRODINOTESLEEP)) { idleSeconds = 0;
|
||||||
|
|
|
@ -63,7 +63,7 @@ bool mdJSON::run()
|
||||||
Json::Value::Members itemNames = suite.getMemberNames();
|
Json::Value::Members itemNames = suite.getMemberNames();
|
||||||
|
|
||||||
for ( i = 0; i < itemNames.size(); ++i ) { const char *thisItem;
|
for ( i = 0; i < itemNames.size(); ++i ) { const char *thisItem;
|
||||||
|
try {
|
||||||
thisItem = itemNames[i].c_str();
|
thisItem = itemNames[i].c_str();
|
||||||
if (debug > 100)
|
if (debug > 100)
|
||||||
theseLogs->logN(1,"item %s.",thisItem);
|
theseLogs->logN(1,"item %s.",thisItem);
|
||||||
|
@ -78,13 +78,18 @@ bool mdJSON::run()
|
||||||
if (!suite[i].isObject()) {
|
if (!suite[i].isObject()) {
|
||||||
theseLogs->logN(1,"'%s' isn't an object, can't use.",thisItem);
|
theseLogs->logN(1,"'%s' isn't an object, can't use.",thisItem);
|
||||||
continue;
|
continue;
|
||||||
}
|
} /*
|
||||||
AC_OTE::theseCases[nCases].parms = &suite[i];
|
AC_OTE::theseCases[nCases].parms = NULL;
|
||||||
AC_OTE::theseCases[nCases].fBody = AC_OTE::theseFuncs[thisItem];
|
AC_OTE::theseCases[nCases].fBody = AC_OTE::theseFuncs[thisItem];
|
||||||
AC_OTE::theseCases[nCases++].caseName = thisItem;
|
AC_OTE::theseCases[nCases++].caseName = thisItem; */
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
theseLogs->logN(1,"Test case binding exception: %s ",thisItem );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
theseLogs->logN(1,"%d cases bound.",nCases);
|
theseLogs->logN(1,"%d cases bound, beginning execution.",nCases);
|
||||||
|
|
||||||
for (i=0;i<AC_OTE::theseCases.size();i++) {
|
for (i=0;i<AC_OTE::theseCases.size();i++) {
|
||||||
try{
|
try{
|
||||||
|
@ -95,7 +100,7 @@ bool mdJSON::run()
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
theseLogs->logN(1,"Inner JSON Exception in %s ",AC_OTE::theseCases[i].caseName );
|
theseLogs->logN(1,"Test case execution exception in %s ",AC_OTE::theseCases[i].caseName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
theseLogs->logN(0,"Suite 'testSuite00' end execution.");
|
theseLogs->logN(0,"Suite 'testSuite00' end execution.");
|
||||||
|
|
Loading…
Reference in New Issue