This commit is contained in:
Ren RenJuan 2014-01-18 20:35:18 +00:00
parent 3f787226eb
commit 9194ef7283
75 changed files with 501 additions and 296 deletions

View File

@ -13,7 +13,7 @@ CC = gcc
#PRODORDEV += -O2
PRODORDEV += -ggdb3
CXXFLAGS = $(PRODORDEV) -Wall -Wpointer-arith -Wcast-qual -D_REENTRANT -fPIC
CXXFLAGS = $(PRODORDEV) -Wall -Wpointer-arith -Wcast-qual -D_REENTRANT -fPIC
CPPFLAGS = -fPIC -D_GNU_SOURCE -D$(LOCATION)
CXXFLAGS += -D_GNU_SOURCE -O0 -D$(LOCATION)
@ -51,7 +51,7 @@ BUILD_OBJ_DIR = build
###### Include Paths
INCLUDE_DIR = -I . -I $(XERCES_INC_DIR) -I $(XALAN_INC_DIR)
INCLUDE_DIR = -I . -I $(XERCES_INC_DIR) -I $(XALAN_INC_DIR) -I ../AusRegCliever/include -I /usr/include
build_obj_dir = $(BUILD_OBJ_DIR)
@ -104,7 +104,7 @@ ARTKLIBS = -L$(BUILD_LIB_DIR) -lACTK1_0 \
-L$(XALAN_LIB_DIR) -lxalan-c -lxalanMsg \
-L$(XERCES_LIB_DIR) -lxerces-c \
-lssl \
-lrt
-lrt -llog4cpp
$(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.o
$(CXX) $(ARTKLIBS) -o $@ $<

View File

@ -13,14 +13,14 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
LPECheckCommand cmd("test-andvalidate.claimsgafour");
const string xml(cmd.toXML());
ASSERT_EQ(cmd.getCommandType()->getCommandName(), "check");
ASSERT_EQ(cmd.getObjectType()->getName(), "domain");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test-andvalidate.claimsgafour</name></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test-andvalidate.claimsgafour</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -26,7 +26,7 @@ void doWork()
* parameters.
*/
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
vector<string> techIds;
@ -36,7 +36,7 @@ void doWork()
eligibilityType, policyReason, registrantName);
const string xml(cmd.toXML());
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.co.ae</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><eligibilityType>Trade License (IT)</eligibilityType><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.co.ae</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><eligibilityType>Trade License (IT)</eligibilityType><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
/**
@ -46,7 +46,7 @@ void doWork()
*
*/
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
vector<string> techIds;
@ -73,7 +73,7 @@ void doWork()
&registrantIDType, &eligibilityName,
&eligibilityID, &eligibilityIDType);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.co.ae</name><period unit=\"m\">48</period><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><registrantID type=\"Trade License\">01241326211</registrantID><eligibilityType>Trade License (IT)</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"Trademark\">1231239523</eligibilityID><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.co.ae</name><period unit=\"m\">48</period><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><registrantID type=\"Trade License\">01241326211</registrantID><eligibilityType>Trade License (IT)</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"Trademark\">1231239523</eligibilityID><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -18,9 +18,12 @@
#include <iostream>
#include <signal.h>
#define MDLOG_USER
#include <mdLogger.h>
const char *otePeer="epp.ote.donuts.co";
int tkScenario=0;
mdLogger mdLog;
namespace {
@ -93,5 +96,7 @@ void scenario(int scenario,const std::string& system_props_file)
{
tkScenario = scenario;
if (tkScenario >= ACTK_OTEB)
mdLog.init(false);
static const Init doInit(system_props_file);
}

View File

@ -3,6 +3,9 @@
#include <string>
char *userLogPath = "./logs/";
int tkDebugThreshold = 9999999999;
void init(const std::string &system_props_file);
void scenario(int which,const std::string &system_props_file);

View File

@ -10,17 +10,17 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
auto_ptr<Command> cmd(new ContactCheckCommand("JTKCON"));
const string xml(cmd->toXML());
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
vector<string> ids;
ids.push_back("JTKCON1");
@ -28,7 +28,7 @@ void doWork()
auto_ptr<Command> cmd(new ContactCheckCommand(ids));
const string xml(cmd->toXML());
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><id>JTKCON2</id></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><id>JTKCON2</id></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,11 +13,11 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
ContactDeleteCommand cmd("JTKCON");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></delete></delete><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,19 +13,19 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
ContactInfoCommand cmd("C100000-AR");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id></info></info><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
ContactInfoCommand cmd("C100000-AR", "jtkUT3st");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id><authInfo><pw>jtkUT3st</pw></authInfo></info></info><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id><authInfo><pw>jtkUT3st</pw></authInfo></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -14,11 +14,11 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
ContactTransferRequestCommand cmd("JTKCON1", "jtkcon1pw");
const string expected("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"request\"><transfer xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><authInfo><pw>jtkcon1pw</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
const string expected("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"request\"><transfer xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><authInfo><pw>jtkcon1pw</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
const string xml(cmd.toXML());
ASSERT_EQ(expected, xml);
}

View File

@ -13,14 +13,14 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainCheckCommand cmd("test.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(cmd.getCommandType()->getCommandName(), "check");
ASSERT_EQ(cmd.getObjectType()->getName(), "domain");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test.com.au</name></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,11 +13,11 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainDeleteCommand cmd("jtkutest.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></delete></delete><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,11 +13,11 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainInfoCommand cmd("jtkutest.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></info></info><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -18,7 +18,7 @@ const static string policyReason = "1";
void testUpdateSingleKVList()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainKVCommandExtension extension(StandardCommandType::UPDATE());
@ -30,13 +30,13 @@ void testUpdateSingleKVList()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testCreateSingleKVList()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainKVCommandExtension extension(StandardCommandType::CREATE());
@ -49,13 +49,13 @@ void testCreateSingleKVList()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testMultipleKVList()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainKVCommandExtension extension(StandardCommandType::CREATE());
@ -69,7 +69,7 @@ void testMultipleKVList()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist><kvlist name=\"au\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist><kvlist name=\"au\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -22,7 +22,7 @@ void addSampleKVItems(DomainRegistrantTransferCommand *command);
void testWithoutPeriod()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
auto_ptr<DomainRegistrantTransferCommand> command(
@ -33,7 +33,7 @@ void testWithoutPeriod()
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>jtkutest.com.ae</name><curExpDate>"
+ EPPDateFormatter::toXSDate(*curExpDate)
+ "</curExpDate><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></extension></epp>"
+ "</curExpDate><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>"
);
}
@ -48,7 +48,7 @@ void testWithPeriod()
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>jtkutest.com.ae</name><curExpDate>"
+ EPPDateFormatter::toXSDate(*curExpDate)
+ "</curExpDate><period unit=\"y\">2</period><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></extension></epp>"
+ "</curExpDate><period unit=\"y\">2</period><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>"
);
}

View File

@ -13,32 +13,32 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></transfer></transfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au", "jtkUt3st");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au", "C100000-AR", "jtkUt3st");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw roid=\"C100000-AR\">jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw roid=\"C100000-AR\">jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -18,18 +18,18 @@ using namespace std;
void testSimpleUpdate()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainUpdateCommand cmd("jtkutest.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
void testFullUpdate()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
const char* addNsText[] = { "ns1.jtkutest.com.au", "ns2.jtkutest.com.au" };
@ -77,12 +77,12 @@ void testFullUpdate()
DomainUpdateCommand cmd("jtkutest.com.au", &pw, &add, &rem, &registrantID);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><add><ns><hostObj>ns1.jtkutest.com.au</hostObj><hostObj>ns2.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"billing\">JTKCON3</contact><status s=\"clientHold\">non-payment</status></add><rem><ns><hostObj>ns3.jtkutest.com.au</hostObj><hostObj>ns4.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON2</contact><contact type=\"admin\">JTKCON</contact><status s=\"clientDeleteProhibited\"></status></rem><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><add><ns><hostObj>ns1.jtkutest.com.au</hostObj><hostObj>ns2.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"billing\">JTKCON3</contact><status s=\"clientHold\">non-payment</status></add><rem><ns><hostObj>ns3.jtkutest.com.au</hostObj><hostObj>ns4.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON2</contact><contact type=\"admin\">JTKCON</contact><status s=\"clientDeleteProhibited\"></status></rem><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
void testSyncExpiryDateExtension(void)
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainUpdateCommand cmd("jtkutest.com.au");
@ -94,7 +94,7 @@ void testSyncExpiryDateExtension(void)
delete newExpiryDate;
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:sync-1.0\"><exDate>2005-04-03T22:00:00.0Z</exDate></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:sync-1.0\"><exDate>2005-04-03T22:00:00.0Z</exDate></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
void testSyncExpiryDateExtensionWithNullDate(void)

View File

@ -13,22 +13,22 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
HostCheckCommand hcc("ns1.jtkutest.com.au");
const string xml(hcc.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
std::vector<std::string> names;
names.push_back("ns1.jtkutest.com.au");
names.push_back("ns2.jtkutest.com.au");
HostCheckCommand hcc(names);
const string xml(hcc.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><name>ns2.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><name>ns2.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,16 +13,16 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
HostCreateCommand hcc("ns1.jtkutest.com.au");
const string xml(hcc.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></create></create><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></create></create><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
vector<InetAddress> addrs;
addrs.push_back(InetAddress("192.168.0.1", IPVersion::IPv4()));
@ -30,7 +30,7 @@ void doWork()
HostCreateCommand hcc("ns1.jtkutest.com.au", &addrs);
const string xml(hcc.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><addr ip=\"v4\">192.168.0.1</addr><addr ip=\"v6\">::1</addr></create></create><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><addr ip=\"v4\">192.168.0.1</addr><addr ip=\"v6\">::1</addr></create></create><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,10 +13,10 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
HostDeleteCommand hcc("ns1.jtkutest.com.au");
const string xml(hcc.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></delete></delete><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -9,12 +9,12 @@ using namespace std;
void doWork()
{
init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
HostInfoCommand cmd("ns1.jtkutest.com.au");
const string xml = cmd.toXML();
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></info></info><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
}
int main(int argc, char* argv[])

View File

@ -21,39 +21,39 @@ void doWork()
init("./etc/toolkit2.conf");
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI></svcs></login><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", objURIs, extURIs);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", "1.0", "fr", objURIs, extURIs);
const string xml(cmd.toXML());
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
}
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
const string newPw("n(-w18PW*");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", &newPw, "1.0", "fr", objURIs, extURIs);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><newPW>n(-w18PW*</newPW><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><newPW>n(-w18PW*</newPW><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,12 +13,12 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
LogoutCommand cmd;
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><logout/><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><logout/><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -9,12 +9,12 @@ using namespace std;
void doWork()
{
init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
PollAckCommand cmd(123);
const string xml = cmd.toXML();
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><poll msgID=\"123\" op=\"ack\"/><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><poll msgID=\"123\" op=\"ack\"/><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
}
int main(int argc, char* argv[])

View File

@ -13,7 +13,7 @@ using namespace std;
void testSecDNSAllFields()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
@ -34,13 +34,13 @@ void testSecDNSAllFields()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSMultipleDSDataWithoutMaxSigLife()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
@ -62,13 +62,13 @@ void testSecDNSMultipleDSDataWithoutMaxSigLife()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>38FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData><dsData><keyTag>6789</keyTag><alg>2</alg><digestType>2</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>38FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData><dsData><keyTag>6789</keyTag><alg>2</alg><digestType>2</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSAllFieldsMin()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
@ -89,13 +89,13 @@ void testSecDNSAllFieldsMin()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>1</maxSigLife><dsData><keyTag>0</keyTag><alg>0</alg><digestType>0</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>0</flags><protocol>0</protocol><alg>0</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>1</maxSigLife><dsData><keyTag>0</keyTag><alg>0</alg><digestType>0</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>0</flags><protocol>0</protocol><alg>0</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSAllFieldsMax()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
@ -116,13 +116,13 @@ void testSecDNSAllFieldsMax()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>2147483647</maxSigLife><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>2147483647</maxSigLife><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSJustKeyData()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
@ -141,7 +141,7 @@ void testSecDNSJustKeyData()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>65535</maxSigLife><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>65535</maxSigLife><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -13,7 +13,7 @@ using namespace std;
void testSecDNSAddFieldsUrgent()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -37,13 +37,13 @@ void testSecDNSAddFieldsUrgent()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><add><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></add></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><add><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveFieldsNotUrgent()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -65,13 +65,13 @@ void testSecDNSRemoveFieldsNotUrgent()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><rem><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></rem></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><rem><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></rem></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAll()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -90,13 +90,13 @@ void testSecDNSRemoveAll()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddDsData()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -120,13 +120,13 @@ void testSecDNSRemoveAllAndAddDsData()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></add></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddKeyData()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -150,13 +150,13 @@ void testSecDNSRemoveAllAndAddKeyData()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddKeyDataAndChangeMaxSigLife()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -185,7 +185,7 @@ void testSecDNSRemoveAllAndAddKeyDataAndChangeMaxSigLife()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add><chg><maxSigLife>604800</maxSigLife></chg></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add><chg><maxSigLife>604800</maxSigLife></chg></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -23,6 +23,7 @@
#include <typeinfo>
extern int tkScenario;
extern mdLogger mdLog;
using namespace std;
@ -31,6 +32,7 @@ ACSession::ACSession(SessionManagerProperties* props)
{
debugLogger = Logger::getLogger(pname + ".debug");
userLogger = Logger::getLogger(pname + ".user");
mdLog.logN(0,"AC Session Mgr compiled on " __DATE__ " @ " __TIME__);
configure(props);
}
@ -40,11 +42,13 @@ ACSession::~ACSession()
void ACSession::run() {
mdLog.logN(0,"Begin Toolkit Scenario %d Session",tkScenario);
SessionManagerImpl::run();
}
void ACSession::shutdown() {
SessionManagerImpl::shutdown();
mdLog.logN(0,"End Toolkit Scenario %d Session",tkScenario);
}

View File

@ -7,7 +7,7 @@
#include <memory>
#include <pthread.h>
#include <mdLogger.h>
class ACSession : public SessionManagerImpl
{

View File

@ -9,7 +9,7 @@ using namespace std;
void testLoginCount()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CommandCounter cc(5000);
ASSERT_EQ(0, cc.getTotal());
ASSERT_EQ(0, cc.getCount(StandardCommandType::LOGIN()));
@ -27,7 +27,7 @@ void testLoginCount()
void testMixedCommandsCount()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
// 5 second 'recent' time.
CommandCounter cc(5000);
@ -49,7 +49,7 @@ void testMixedCommandsCount()
ASSERT_EQ(4, cc.getRecentExactTotal());
// 10 seconds later, which is greater than 5 seconds.
Timer::setTime("20070101.010111");
Timer::setTime("20140101.010111");
ASSERT_EQ(4, cc.getTotal());
ASSERT_EQ(4, cc.getRecentTotal());
@ -62,7 +62,7 @@ void testMixedCommandsCount()
void testPollCount()
{
Timer::setTime("");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
// 5 second recent window.
CommandCounter cc(5000);
@ -73,16 +73,16 @@ void testPollCount()
ASSERT_EQ(1, cc.getRecentCount(StandardCommandType::POLL()));
// advance to 3sec
Timer::setTime("20070101.010103");
Timer::setTime("20140101.010103");
cc.increment(StandardCommandType::POLL());
ASSERT_EQ(2, cc.getRecentCount(StandardCommandType::POLL()));
// advance to 8sec, (1sec event gone)
Timer::setTime("20070101.010108");
Timer::setTime("20140101.010108");
ASSERT_EQ(1, cc.getRecentCount(StandardCommandType::POLL()));
// advance to 17sec (7 second event gone).
Timer::setTime("20070101.010117");
Timer::setTime("20140101.010117");
ASSERT_EQ(0, cc.getRecentCount(StandardCommandType::POLL()));
}

View File

@ -12,9 +12,9 @@
enum acTKScenario {
ACTK_ALONE = 0,
ACTK_INSECURE,
ACTK_OTEA,
ACTK_OTEB,
ACTK_OTEC,
ACTK_OTEA, // Connectivity
ACTK_OTEB, // Basic Access
ACTK_OTEC, // Full Access
ACTK_PROD,
N_ACTK_SCENARIOS
};

View File

@ -71,7 +71,7 @@ void doWork()
}
try {
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
op = "newInstance";
auto_ptr<SessionManager> manager(SessionManagerFactory::newInstance(&props));
op = "startup";

View File

@ -9,8 +9,8 @@ using namespace std;
int main(int argc, char* argv[])
{
const std::string bad_time = "123";
const std::string good_time = "20070101.010101";
const std::string good_time_string = "Mon Jan 1 01:01:01 2007\n";
const std::string good_time = "20140101.010101";
const std::string good_time_string = "Mon Jan 1 01:01:01 2014\n";
std::string timeString;
time_t time;

View File

@ -7,8 +7,7 @@
#include <unistd.h>
bool cdHasTk;
char cdOrTkValue;
const char *cdOrTk=&cdOrTkValue;
const char *cdOrTk=NULL;
using namespace std;
@ -121,13 +120,14 @@ void acClientServer() { // AKA "Cliever"
}
int main(int const argc, const char ** const argv)
{
bool noParms=false;
const char *exeName,*banner = "\n" CD_NAME " " CD_VERSION " compiled on " __DATE__ " @ " __TIME__ " (%d)\n";
int mthParm, rc = OK;
int mthParm=2, rc = OK;
thisCliever = NULL;
cdHasTk = strstr(argv[0],"loadtk") ? true : false;
cdOrTkValue = cdHasTk ? 'd' : 'D'; // d == EPP Toolkit enabled, D = !d
cdOrTk = argv[0];
cdHasTk = strstr(cdOrTk,"ausreg-cd") ? true : false;
shm.truncate(CD_GLOBAL_SIZE);
mapped_region acCDglobal(shm, read_write);
@ -141,17 +141,27 @@ int main(int const argc, const char ** const argv)
thisConfig->shellProcess = getpid();
strcpy(thisConfig->origCmd,argv[0]);
if (argc < 2 || argc > 7) usage();
if (argc < 1 || argc > 7) usage();
if (argc == 1 || *argv[1] == '?')
{ noParms = true;
thisConfig->telemetryPort = 5000;
mthParm=1;
}
else thisConfig->telemetryPort = atoi(argv[1]);
thisConfig->telemetryPort = atoi(argv[1]);
if (thisConfig->telemetryPort < 1000 || thisConfig->telemetryPort > 65535)
{
std::cerr << "The <telemetry-udp-port> value is invalid.\n";
exit(1);
}
thisConfig->telemetryPortStr = std::string(argv[1]);
for (mthParm=2;mthParm < argc;mthParm++) {
if (*argv[mthParm] == '*') {
if (argc > 1) thisConfig->telemetryPortStr = std::string(argv[1]);
for (;mthParm < argc;mthParm++) {
if (*argv[mthParm] == '?') {
usage();
}
else
if (*argv[mthParm] == '*') {
thisConfig->runCommander = false;
}
else
@ -234,8 +244,8 @@ void signal_handler(int sig)
}
void usage() {
std::cerr << "Usage: " << cdOrTk<< " <udp-port> ['*'] [device=TEST] [mdIP=" MD_DEFAULT_IP "] [logs=\\tmp]\n\n where \n\n"
"\t <udp-port> is required, must be the first parameter, and must be 1000 or greater. \n"
std::cerr << "Usage: " << cdOrTk << " <udp-port> ['*'] [device=TEST] [mdIP=" MD_DEFAULT_IP "] [logs=\\tmp]\n\n where \n\n"
"\t <udp-port> defaults to 5000, must be the first parameter, and must be 1000 or greater. \n"
"\t The other parameters are optional and non-positional and take the shown defaults. \n"
"\t '*', if present, indicates skip the command loop (string quotes may be required). \n\n";
exit(1);

View File

@ -106,6 +106,10 @@ void mdCommander::driver() {
memset(argsNow,0,sizeof(argsNow));
initscr();
cbreak();
getmaxyx(stdscr,row,col);
if (row < 30 || col < 80) {
std::cerr << "Terminal too small for AC commander.";
}
greet();
while(acceptingInput) {
refresh();
@ -222,12 +226,18 @@ void mdCommander::driver() {
}
if (strlen(rawString) >= 3 && strlen(rawString) <= 5 )
{if (!strcmp(rawString,"log")) {
{if (!strcmp(rawString,"loG")) {
sprintf(wwork,"cut -b 1-%d /tmp/ausreg-cd.log | less",col);
system(wwork);
clear();
continue;
}
if (!strcmp(rawString,"log")) {
sprintf(wwork,"cut -b 1-%d /tmp/ausreg-cd-ui.log | less",col);
system(wwork);
clear();
continue;
}
if (!strcmp(rawString,"mlog")) {
sprintf(wwork,"cut -b 1-%d /tmp/drde-cliever.log | less",col);
system(wwork);
@ -243,6 +253,10 @@ void mdCommander::driver() {
system(work);
shm.remove("ausreg-cd-global");
sprintf(work,"rm /tmp/ausreg-cd.lock");
shm.remove("ausreg-cd-global");
sprintf(work,"rm /tmp/ausreg-cd-ui.log");
system(work);
sprintf(work,"rm /tmp/ausreg-cd.log");
system(work);
goto done;
}
@ -266,7 +280,6 @@ void mdCommander::greet() {
*prompt="Enter ? or command";
sprintf(theBanner,banner,thisConfig->shellProcess,thisConfig->daemonProcess);
getmaxyx(stdscr,row,col);
mvprintw(0,(col-strlen(banner))/2,"%s",theBanner);
mvprintw(row/2,(col-strlen(title))/2,"%s",title);
mvprintw((row/2)+2,(col-strlen(warn))/2,"%s",warn);
@ -291,12 +304,14 @@ void mdCommander::help() {
mvprintw(13,10," W<n> - write <n> to the AC watched folder");
mvprintw(14,10," X<n> - discard ");
mvprintw(15,10," <n> - make <n> the target device");
mvprintw(16,10," log - display this cliever's log");
mvprintw(17,10," mlog - display the master daemon log");
mvprintw(18,10," done - terminate commander but not process");
mvprintw(19,10," q/quit - terminate this process and its' children");
mvprintw(23,5,"<n> is an integer, above active everywhere outside data entry (>>)");
mvprintw(24,5,"no space before <n>, X0/W0 to delete/write all commands.");
mvprintw(16,10," loG - display this cd UI log");
mvprintw(17,10," log - display this cd daemon log*");
mvprintw(18,10," mlog - display the master daemon log");
mvprintw(19,10," done - terminate commander but not process");
mvprintw(20,10," q/quit - end process tree, delete log files");
mvprintw(22,5,"<n> is an integer, above active everywhere outside data entry (>>)");
mvprintw(23,5,"no space before <n>, X0/W0 to delete/write all commands.");
mvprintw(24,5,"*will be inaccessible if another user running cd on this computer.");
mvprintw(row-2,1,"%s",prompt);
refresh();
@ -317,10 +332,20 @@ void mdCommander::eppMainMenu() {
mvprintw(15,10," U - update");
mvprintw(16,10," D - delete");
mvprintw(17,10," T - transfer");
mvprintw(18,10," D - delete");
mvprintw(19,10,"Meta");
mvprintw(20,10," x - load XML for 1 above from ./xml ");
mvprintw(21,10," A - load all named above from ./xml ");
mvprintw(20,10," x<letter> - load XSD for 1 above");
mvprintw(21,10," A - load all above");
mvprintw(22,10," v<letter> - vi/xmledit the schema ");
mvprintw(23,10," w<letter> - write blank XML form for 1 above");
mvprintw(24,10," W - write blank forms for all");
mvprintw(8,50, "Commands are defined");
mvprintw(9,50, "by the xsd in ./resources.");
mvprintw(11,50,"These reflect what's in");
mvprintw(12,50,"the SourceForge 2007 ");
mvprintw(13,50,"toolkit and AC now.");
mvprintw(15,50,"If no XSD loaded you'll see");
mvprintw(16,50,"stubs in the internal editor.");
say((char *)"Action letter or ? to exit");
}

View File

@ -27,11 +27,13 @@ class ausRegEPPTK {
// See the Toolkit Overview. At tkScenario zeo supposedly it can do everything.
ausRegEPPTK() { // tkScenario = ACTK_OTEB; moved to config
ausRegEPPTK() { tkScenario=thisConfig->tkScenario; // Maybe R-R pair specific later
daysRunning = 0;
}
bool doNothing(const std::string propertiesFilePath);
void doOTEA();
void doOTEB();
void doOTEC();
void doOTEP();
};

View File

@ -38,10 +38,6 @@ namespace fsm = boost::statechart;
#include "mdState.h"
#include "mdHost.h"
#if ARTKENABLED > 0
#include "ausRegTK.h"
#endif
#define MD_HAUSHALT 2000 // milliseconds between attention routine
#define MD_LOCK_FILE "cliever-md.lock"
@ -64,4 +60,8 @@ namespace fsm = boost::statechart;
#endif
#if ARTKENABLED > 0
#include "ausRegTK.h"
#endif

View File

@ -43,7 +43,7 @@ public:
received,
sentCommands;
#if ARTKENABLED > 0
#if (ARTKENABLED > 0)
ausRegEPPTK *artk;
#endif
masterDaemonConfig *cfg;

View File

@ -22,7 +22,7 @@ public:
handle,mdStdDevIdx;
md_device type;
mdState state;
std::string vendor;
udp::endpoint ip;
// Superset of the RFC speced
@ -35,7 +35,7 @@ public:
mdHost(md_device t) : type(t) {clieverGroup = handle = mdStdDevIdx = -1;}
T* registeR(md_device t);
void registrY(T* device,std::string operatorName);
void registerCmd(const char *cmdName,const mdIncoming &mdI);
};
@ -65,7 +65,14 @@ public:
mdPeer() : mdHost<mdPeer>( MDDEV_PEER )
{
cmds["RST"] = new mdCommand((md_mand)0,std::string("RST"));
cmds["check"] = new mdCommand((md_mand)0,std::string("CHK"));
cmds["info"] = new mdCommand((md_mand)0,std::string("INF"));
cmds["poll"] = new mdCommand((md_mand)0,std::string("POL"));
cmds["transfer query"] = new mdCommand((md_mand)0,std::string("TQY"));
cmds["create"] = new mdCommand((md_mand)0,std::string("REG"));
cmds["renew"] = new mdCommand((md_mand)0,std::string("REN"));
cmds["poll"] = new mdCommand((md_mand)0,std::string("POL"));
cmds["transfer query"] = new mdCommand((md_mand)0,std::string("TQY"));
}
mdPeer *validateClient(int handle, const mdClientBirth &c, mdResponse &r);
void registerCmd(const char *cmdName,const mdIncoming &mdI);

View File

@ -8,15 +8,28 @@
#include "log4cpp/BasicLayout.hh"
#include "log4cpp/Priority.hh"
#ifndef KEEPINSYNCWMD
#define KEEPINSYNCWMD
enum acTKScenario {
ACTK_ALONE = 0,
ACTK_INSECURE,
ACTK_OTEA,
ACTK_OTEB,
ACTK_OTEC,
ACTK_PROD,
N_ACTK_SCENARIOS
};
#endif
using namespace log4cpp;
class mdLogger {
public:
char *logPath;
mdLogger() {};
mdLogger() {};
void init();
void init(bool isMain);
void logN(int n, const char *format, ...);
// log iff m positive and >= config.debugThreshold,
// set in powers of 10

View File

@ -224,7 +224,7 @@ void masterDaemon::processEvent( const mdAPIFrame &thisFrame )
assert(EventSender<mdAPIFrame>::isSending());
}
void oteA() {
#if ARTKENABLED > 0
#if (ARTKENABLED > 0)
int nthDay;
for (nthDay=0;nthDay<30;nthDay++) {
@ -236,27 +236,49 @@ void oteA() {
}
#endif
}void oteB() {
#if ARTKENABLED > 0
#if (ARTKENABLED > 0)
theseLogs->logNdebug(MAX_DEBUG,0,"OTE Basic Access BOJ");
thisService->artk->doOTEB();
theseLogs->logNdebug(MAX_DEBUG,0,"OTE Basic Access end of Batch");
#endif
}
void oteC() {
#if (ARTKENABLED > 0)
int nthDay;
theseLogs->logNdebug(MAX_DEBUG,0,"OTE Full Access BOJ");
thisService->artk->doOTEB();
theseLogs->logNdebug(MAX_DEBUG,0,"OTE Full Access end of Batch");
#endif
}
void oteP() {
#if (ARTKENABLED > 0)
int nthDay;
for (nthDay=0;nthDay<30;nthDay++) {
theseLogs->logNdebug(MAX_DEBUG,1,"PreProd / OTEB day %d",nthDay);
thisService->artk->doOTEB();
theseLogs->logNdebug(MAX_DEBUG,1,"Preprod/ OTEB day %d",nthDay);
theseLogs->logNdebug(MAX_DEBUG,1,"AC Production SoD %d",nthDay);
thisService->artk->doOTEP();
theseLogs->logNdebug(MAX_DEBUG,1,"AC Production EoD %d",nthDay);
thisService->artk->daysRunning = nthDay;
}
#endif
}
}
void masterDaemon::run() {
deviceFactory = new mdHostFabrik();
fg = new mdDGChannel( thisService->io_, 0 );
#if ARTKENABLED > 0
#if (ARTKENABLED > 0)
if (initAusRegTK()) return;
theseLogs->logNdebug(MAX_DEBUG,1,"Aus Registry Toolkit Scenario %d.",
thisConfig->tkScenario);
if (artk->tkScenario == ACTK_OTEA) {
boost::thread oteArun(oteA);
assert(oteArun.joinable());
@ -267,13 +289,25 @@ void masterDaemon::run() {
boost::thread oteBrun(oteB);
assert(oteBrun.joinable());
oteBrun.join();
theseLogs->logNdebug(MAX_DEBUG,0,"Pre-production Ops / OTEB EOJ.");
theseLogs->logNdebug(MAX_DEBUG,0,"OTE Basic Access Test EOJ.");
}
if (artk->tkScenario == ACTK_OTEC) {
boost::thread oteCrun(oteC);
assert(oteCrun.joinable());
oteCrun.join();
theseLogs->logNdebug(MAX_DEBUG,0,"OTE Full Access EOJ.");
}
if (artk->tkScenario == ACTK_PROD) {
boost::thread otePrun(oteC);
assert(otePrun.joinable());
otePrun.join();
theseLogs->logNdebug(MAX_DEBUG,0,"AC Production EOJ.");
}
#endif
listen();
boost::thread work(mdWQ);
assert(work.joinable());
theseLogs->logNdebug(MAX_DEBUG,0,"Master Daemon worker started, foreground async i/o service joins MD worker.");
theseLogs->logNdebug(MAX_DEBUG,0,"Batches done, MD worker start, joins worker.");
io_.run();
work.join();
}

View File

@ -7,7 +7,7 @@ masterDaemonConfig::masterDaemonConfig() {
tkScenario = ACTK_PROD;
nClievers = 0;
configPath = "./";
configPath = "./etc/toolkit2.conf";
logPath = "/tmp";
daemonized = true;
// used in the logNdebug by increasing power of 10.

View File

@ -5,6 +5,16 @@
#include "common/SystemProperties.hpp"
#include "session/Session.hpp"
#include "session/StatsManager.hpp"
#include "se/DomainCheckCommand.hpp"
#include "se/DomainCheckResponse.hpp"
#include "OTE/LPECheckCommand.hpp"
#include "OTE/LPECheckResponse.hpp"
#include "se/DomainCreateCommand.hpp"
#include "se/DomainCreateResponse.hpp"
#include "se/DomainRegistrantTransferCommand.hpp"
#include "se/DomainRegistrantTransferResponse.hpp"
#include "OTE/LPECreateCommand.hpp"
#include "OTE/LPECreateResponse.hpp"
using namespace std;
@ -37,7 +47,7 @@ void ausRegEPPTK::doOTEA()
scenario(tkScenario,thisConfig->cfg_path);
try {
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
auto_ptr<SessionManager> manager(SessionManagerFactory::newInstance(&props));
auto_ptr<Session> sess(SessionFactory::newInstance(&props));
op = "startup";
@ -74,14 +84,13 @@ void ausRegEPPTK::doOTEA()
}
void ausRegEPPTK::doOTEB()
{
int cmd=0;
int cmd=0,thisAccount=0;
string op("newInstance");
if (!daysRunning)
scenario(tkScenario,thisConfig->cfg_path);
scenario(tkScenario,thisConfig->cfg_path);
try {
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
auto_ptr<SessionManager> manager(SessionManagerFactory::newInstance(&props));
auto_ptr<Session> sess(SessionFactory::newInstance(&props));
op = "startup";
@ -91,17 +100,52 @@ void ausRegEPPTK::doOTEB()
sess->open();
theseLogs->logN(1,"OTE Basic Access Tests.");
theseLogs->logN(1,"OTE Basic Access Tests (%d).",cmd++);
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");
DomainCheckResponse baResponse_1;
theseLogs->logN(1,"(%d) LPE Check of test-validate.claimsgasix",cmd++);
theseLogs->logN(1,"(%d) Register <registrar>.ote using OTE Account %d.",cmd++);
theseLogs->logN(1,"(%d) Transfer <register>.ote to OTE Account %d.",cmd++);
LPECheckCommand baCommand_2("test-validate.claimsgasix");
LPECheckResponse baResponse_2;
theseLogs->logN(2,"(%d) Register <registrar>.ote using OTE Account %d.",cmd++,
thisAccount++);
const std::string pw("password");
const std::string RID("registrantID");
DomainCreateCommand baCommand_3("secura1.ote",pw,&RID);
DomainCreateResponse baResponse_3;
theseLogs->logN(2,"(%d) Transfer <registrar>.ote to OTE Account %d.",cmd++,
thisAccount++);
const XMLGregorianCalendar curExpDate;
const std::string kvListName;
const std::string explanation;
DomainRegistrantTransferCommand
baCommand_4("secura1.ote",curExpDate,kvListName,explanation);
DomainRegistrantTransferResponse baResponse_4;
theseLogs->logN(1,"(%d) Sunrise create with ICANN SMD test files.",cmd++);
LPECreateCommand baCommand_5("test-validate.claimsgasix",pw,&RID);
LPECreateResponse baResponse_5;
theseLogs->logN(1,"(%d) Attempt create subject to claims.",cmd++);
LPECreateCommand baCommand_6("test-validate.claimsgasix",pw,&RID);
LPECreateResponse baResponse_6;
theseLogs->logN(1,"End OTE Basic Access Tests.",cmd++);
sess->close();
@ -111,12 +155,57 @@ void ausRegEPPTK::doOTEB()
catch (EPPException& e)
{ const char *eMsg = e.getMessage().c_str();
const char *opNow = op.c_str();
theseLogs->logN(2,"EPP Exception during OTE A (%s): %s .",opNow,eMsg);
theseLogs->logN(2,"EPP Exception during OTE B (%s): %s .",opNow,eMsg);
throw e;
}
catch (...)
{
theseLogs->logN(2,"General Exception during OTE A (%s).",op.c_str());
theseLogs->logN(2,"General Exception during OTE B (%s).",op.c_str());
}
}
void ausRegEPPTK::doOTEP()
{
int hours,hoops;
string op("newInstance");
scenario(thisConfig->tkScenario,thisConfig->cfg_path);
try {
Timer::setTime("20140101.010101");
auto_ptr<SessionManager> manager(SessionManagerFactory::newInstance(&props));
auto_ptr<Session> sess(SessionFactory::newInstance(&props));
op = "startup";
manager->startup();
op = "run (keep-alive)";
manager->run();
sess->open();
for (hours=0;hours < 24;hours++) {
// Spawn the keep alive thread.
theseLogs->logN(1,"AC Production Hour %d.",hours);
// if thisEPPServer(mdStdDevIdx).vendor == "Donuts"
for (hoops=0;hoops<7;hoops++) {
sess->writeXML(TEST_SE);
sess->read();
sleep(857);
}
}
sess->close();
manager->shutdown();
}
catch (EPPException& e)
{ const char *eMsg = e.getMessage().c_str();
const char *opNow = op.c_str();
theseLogs->logN(2,"EPP Exception in Production (%s): %s .",opNow,eMsg);
throw e;
}
catch (...)
{
theseLogs->logN(2,"General Exception Production (%s).",op.c_str());
}
}

View File

@ -45,9 +45,9 @@ template<class T> T* mdHost<T>::registeR(md_device t) {
thisConfig->allClients[h] = value; // validateClient has already added to group
return value ;
}/*
}
template<class T>
void mdHost<T>::lxi_control(T *device, std::string fullText) {
void mdHost<T>::registrY(T *device, std::string fullText) {
T *target = device;
char *ip,*port,*command,*timeout,*argv[5];
@ -62,14 +62,14 @@ template<class T>
sprintf(timeout,"--timeout %s",target->timeout.c_str());
sprintf(command,"--scpi %s",fullText.c_str());
lxi_control(5,argv);
vendor = fullText;
free(ip);
free(port);
free(timeout);
free(command);
}*/
}
mdClientServer* mdClientServer::validateClient(int handle, mdResponse &r) {
bool isNew=true;
@ -136,7 +136,7 @@ mdPeer* mdPeer::validateClient(int handle, const mdClientBirth &c, mdResponse &r
}
std::string mdHostFabrik::newFromAPI(md_device type,std::string thisSpecialOne) {
// stub for XMLRPC/APIG dynamic API
}
void mdHostFabrik::newFromHeartbeat(const mdClientBirth &thisOne) {

View File

@ -1,5 +1,11 @@
#ifndef MDLOG_USER
#include "cliever-md.h"
#else
// External user set log base path with this someplace
extern char * userLogPath;
#endif
#include "log4cpp/Category.hh"
#include "log4cpp/Appender.hh"
#include "log4cpp/FileAppender.hh"
@ -18,21 +24,25 @@ using namespace log4cpp;
PatternLayout *layout;
char *logPath,*mainLogFileName,xmlrpcLogFileName;
void mdLogger::init() {
void mdLogger::init(bool isMain) {
const char *mainLogFileName = "drde-cliever.log",
*actkLogFileName = "actk1_3_2.log";
logPath = new char [strlen(thisConfig->logPath) +
strlen(actkLogFileName) + 2];
strcpy(logPath,thisConfig->logPath);
#ifdef MDLOG_USER
logPath = new char [strlen(userLogPath) +
strlen(actkLogFileName) + 2];
strcpy(logPath,userLogPath);
strcat(logPath,"/");
strcat(logPath,actkLogFileName);
#if (MDLOG_USER == 1)
thisConfig->xmlrpcLogpath = logPath;
logPath = new char [strlen(thisConfig->logPath) +
#endif
#else
logPath = new char [strlen(thisConfig->logPath) +
strlen(mainLogFileName) + 1];
strcpy(logPath,thisConfig->logPath);
@ -41,7 +51,8 @@ void mdLogger::init() {
thisConfig->logPath = logPath;
app = new FileAppender("default", std::string(logPath));
#endif
app = new FileAppender("default", logPath);
layout = new PatternLayout();
layout->setConversionPattern("%d %p %c %x: %m%n");
app->setLayout(layout);

View File

@ -26,7 +26,7 @@ void doWork()
* parameters.
*/
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
vector<string> techIds;
@ -36,7 +36,7 @@ void doWork()
eligibilityType, policyReason, registrantName);
const string xml(cmd.toXML());
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.co.ae</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><eligibilityType>Trade License (IT)</eligibilityType><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.co.ae</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><eligibilityType>Trade License (IT)</eligibilityType><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
/**
@ -46,7 +46,7 @@ void doWork()
*
*/
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
vector<string> techIds;
@ -73,7 +73,7 @@ void doWork()
&registrantIDType, &eligibilityName,
&eligibilityID, &eligibilityIDType);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.co.ae</name><period unit=\"m\">48</period><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><registrantID type=\"Trade License\">01241326211</registrantID><eligibilityType>Trade License (IT)</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"Trademark\">1231239523</eligibilityID><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.co.ae</name><period unit=\"m\">48</period><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ae:params:xml:ns:aeext-1.0\" xsi:schemaLocation=\"urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd\"><aeProperties><registrantName>AusRegistry</registrantName><registrantID type=\"Trade License\">01241326211</registrantID><eligibilityType>Trade License (IT)</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"Trademark\">1231239523</eligibilityID><policyReason>1</policyReason></aeProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -12,12 +12,12 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
ArDomainPolicyDeleteCommand cmd("jtkutest.com.au", "jtkutest");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><policyDelete><policyDelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name><reason>jtkutest</reason></policyDelete></policyDelete><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></extension></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><policyDelete><policyDelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name><reason>jtkutest</reason></policyDelete></policyDelete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
}
}

View File

@ -12,12 +12,12 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
ArDomainPolicyUndeleteCommand cmd("jtkutest.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><policyUndelete><policyUndelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name></policyUndelete></policyUndelete><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></extension></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><policyUndelete><policyUndelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name></policyUndelete></policyUndelete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
}
}

View File

@ -13,11 +13,11 @@ void doWork()
{
init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
ArDomainUndeleteCommand cmd("jtkutest.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><undelete><undelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name></undelete></undelete><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></extension></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><undelete><undelete xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name></undelete></undelete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
}
int main(int argc, char* argv[])

View File

@ -13,13 +13,13 @@ void doWork()
{
init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
ArDomainUnrenewCommand cmd(
"jtkutest.com.au", *EPPDateFormatter::fromXSDateTime("2014-01-01T00:00:00.0Z"));
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><unrenew><unrenew xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name><curExpDate>2014-01-01</curExpDate></unrenew></unrenew><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></extension></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:arext-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:arext-1.0 arext-1.0.xsd\"><unrenew><unrenew xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\" xsi:schemaLocation=\"urn:X-ar:params:xml:ns:ardomain-1.0 ardomain-1.0.xsd\"><name>jtkutest.com.au</name><curExpDate>2014-01-01</curExpDate></unrenew></unrenew><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
}
int main(int argc, char* argv[])

View File

@ -26,7 +26,7 @@ void doWork()
* parameters.
*/
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
vector<string> techIds;
@ -36,7 +36,7 @@ void doWork()
eligibilityType, policyReason, registrantName);
const string xml(cmd.toXML());
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><auProperties><registrantName>AusRegistry</registrantName><eligibilityType>Company</eligibilityType><policyReason>1</policyReason></auProperties></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><registrant>JTKCON</registrant><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><auProperties><registrantName>AusRegistry</registrantName><eligibilityType>Company</eligibilityType><policyReason>1</policyReason></auProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
/**
@ -46,7 +46,7 @@ void doWork()
*
*/
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
vector<string> techIds;
@ -71,7 +71,7 @@ void doWork()
&registrantIDType, &eligibilityName,
&eligibilityID, &eligibilityIDType);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><auProperties><registrantName>AusRegistry</registrantName><registrantID type=\"ACN\">01241326211</registrantID><eligibilityType>Company</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"OTHER\">1231239523</eligibilityID><policyReason>1</policyReason></auProperties></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><ns><hostObj>ns1.ausregistry.net</hostObj><hostObj>ns2.ausregistry.net</hostObj></ns><registrant>JTKCON</registrant><contact type=\"admin\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"tech\">JTKCON2</contact><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><auProperties><registrantName>AusRegistry</registrantName><registrantID type=\"ACN\">01241326211</registrantID><eligibilityType>Company</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"OTHER\">1231239523</eligibilityID><policyReason>1</policyReason></auProperties></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -21,7 +21,7 @@ void doWork()
const string eligibilityIDType = "OTHER";
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
AuDomainModifyRegistrantCommand cmd(
@ -36,7 +36,7 @@ void doWork()
&eligibilityID,
&eligibilityIDType);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><extension><update xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><auProperties><registrantName>AusRegistry</registrantName><registrantID type=\"ACN\">01241326211</registrantID><eligibilityType>Company</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"OTHER\">1231239523</eligibilityID><policyReason>1</policyReason></auProperties><explanation>testing</explanation></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><extension><update xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><auProperties><registrantName>AusRegistry</registrantName><registrantID type=\"ACN\">01241326211</registrantID><eligibilityType>Company</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"OTHER\">1231239523</eligibilityID><policyReason>1</policyReason></auProperties><explanation>testing</explanation></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -25,7 +25,7 @@ void doWork()
auto_ptr<XMLGC::XMLGregorianCalendar> curExpDate(EPPDateFormatter::fromXSDateTime("2014-01-01T01:01:01.0Z"));
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
AuDomainTransferRegistrantCommand cmd(
@ -36,11 +36,11 @@ void doWork()
registrantName,
"testing");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><registrantTransfer><registrantTransfer xmlns=\"urn:X-au:params:xml:ns:audomain-1.0\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:audomain-1.0 audomain-1.0.xsd\"><name>jtkutest.com.au</name><curExpDate>2014-01-01</curExpDate><auProperties><registrantName>AusRegistry</registrantName><eligibilityType>Other</eligibilityType><policyReason>1</policyReason></auProperties><explanation>testing</explanation></registrantTransfer></registrantTransfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></extension></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><registrantTransfer><registrantTransfer xmlns=\"urn:X-au:params:xml:ns:audomain-1.0\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:audomain-1.0 audomain-1.0.xsd\"><name>jtkutest.com.au</name><curExpDate>2014-01-01</curExpDate><auProperties><registrantName>AusRegistry</registrantName><eligibilityType>Other</eligibilityType><policyReason>1</policyReason></auProperties><explanation>testing</explanation></registrantTransfer></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
}
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
Period p(2, PeriodUnit::YEARS());
@ -58,7 +58,7 @@ void doWork()
&eligibilityIDType,
&p);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><registrantTransfer><registrantTransfer xmlns=\"urn:X-au:params:xml:ns:audomain-1.0\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:audomain-1.0 audomain-1.0.xsd\"><name>jtkutest.com.au</name><curExpDate>2014-01-01</curExpDate><period unit=\"y\">2</period><auProperties><registrantName>AusRegistry</registrantName><registrantID type=\"ACN\">01241326211</registrantID><eligibilityType>Company</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"OTHER\">1231239523</eligibilityID><policyReason>1</policyReason></auProperties><explanation>testing</explanation></registrantTransfer></registrantTransfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></extension></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><registrantTransfer><registrantTransfer xmlns=\"urn:X-au:params:xml:ns:audomain-1.0\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:audomain-1.0 audomain-1.0.xsd\"><name>jtkutest.com.au</name><curExpDate>2014-01-01</curExpDate><period unit=\"y\">2</period><auProperties><registrantName>AusRegistry</registrantName><registrantID type=\"ACN\">01241326211</registrantID><eligibilityType>Company</eligibilityType><eligibilityName>Blah</eligibilityName><eligibilityID type=\"OTHER\">1231239523</eligibilityID><policyReason>1</policyReason></auProperties><explanation>testing</explanation></registrantTransfer></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>");
}
}

View File

@ -10,17 +10,17 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
auto_ptr<Command> cmd(new ContactCheckCommand("JTKCON"));
const string xml(cmd->toXML());
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
vector<string> ids;
ids.push_back("JTKCON1");
@ -28,7 +28,7 @@ void doWork()
auto_ptr<Command> cmd(new ContactCheckCommand(ids));
const string xml(cmd->toXML());
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><id>JTKCON2</id></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><id>JTKCON2</id></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,11 +13,11 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
ContactDeleteCommand cmd("JTKCON");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></delete></delete><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON</id></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,19 +13,19 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
ContactInfoCommand cmd("C100000-AR");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id></info></info><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
ContactInfoCommand cmd("C100000-AR", "jtkUT3st");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id><authInfo><pw>jtkUT3st</pw></authInfo></info></info><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>C100000-AR</id><authInfo><pw>jtkUT3st</pw></authInfo></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -14,11 +14,11 @@ void doWork()
{
init("./etc/toolkit2.conf");
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
ContactTransferRequestCommand cmd("JTKCON1", "jtkcon1pw");
const string expected("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"request\"><transfer xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><authInfo><pw>jtkcon1pw</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
const string expected("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"request\"><transfer xmlns=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><id>JTKCON1</id><authInfo><pw>jtkcon1pw</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
const string xml(cmd.toXML());
ASSERT_EQ(expected, xml);
}

View File

@ -13,14 +13,14 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainCheckCommand cmd("test.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(cmd.getCommandType()->getCommandName(), "check");
ASSERT_EQ(cmd.getObjectType()->getName(), "domain");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test.com.au</name></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>test.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,11 +13,11 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainDeleteCommand cmd("jtkutest.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></delete></delete><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,11 +13,11 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainInfoCommand cmd("jtkutest.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></info></info><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -18,7 +18,7 @@ const static string policyReason = "1";
void testUpdateSingleKVList()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainKVCommandExtension extension(StandardCommandType::UPDATE());
@ -30,13 +30,13 @@ void testUpdateSingleKVList()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testCreateSingleKVList()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainKVCommandExtension extension(StandardCommandType::CREATE());
@ -49,13 +49,13 @@ void testCreateSingleKVList()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testMultipleKVList()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainKVCommandExtension extension(StandardCommandType::CREATE());
@ -69,7 +69,7 @@ void testMultipleKVList()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist><kvlist name=\"au\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.ae</name><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\"><kvlist name=\"ae\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist><kvlist name=\"au\"><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantName\">AusRegistry</item></kvlist></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -22,7 +22,7 @@ void addSampleKVItems(DomainRegistrantTransferCommand *command);
void testWithoutPeriod()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
auto_ptr<DomainRegistrantTransferCommand> command(
@ -33,7 +33,7 @@ void testWithoutPeriod()
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>jtkutest.com.ae</name><curExpDate>"
+ EPPDateFormatter::toXSDate(*curExpDate)
+ "</curExpDate><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></extension></epp>"
+ "</curExpDate><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>"
);
}
@ -48,7 +48,7 @@ void testWithPeriod()
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><extension><command xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><registrantTransfer><name>jtkutest.com.ae</name><curExpDate>"
+ EPPDateFormatter::toXSDate(*curExpDate)
+ "</curExpDate><period unit=\"y\">2</period><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></extension></epp>"
+ "</curExpDate><period unit=\"y\">2</period><kvlist xmlns=\"urn:X-ar:params:xml:ns:kv-1.0\" name=\"ae\"><item key=\"eligibilityIDType\">Trademark</item><item key=\"eligibilityIDValue\">1231239523</item><item key=\"eligibilityName\">Blah</item><item key=\"eligibilityType\">Trademark</item><item key=\"policyReason\">1</item><item key=\"registrantIDType\">Trade License</item><item key=\"registrantIDValue\">01241326211</item><item key=\"registrantName\">AusRegistry</item></kvlist><explanation>testing</explanation></registrantTransfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></extension></epp>"
);
}

View File

@ -13,32 +13,32 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></transfer></transfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au", "jtkUt3st");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
DomainTransferQueryCommand cmd("jtkutest.com.au", "C100000-AR", "jtkUt3st");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw roid=\"C100000-AR\">jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><transfer op=\"query\"><transfer xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw roid=\"C100000-AR\">jtkUt3st</pw></authInfo></transfer></transfer><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -18,18 +18,18 @@ using namespace std;
void testSimpleUpdate()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainUpdateCommand cmd("jtkutest.com.au");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
void testFullUpdate()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
const char* addNsText[] = { "ns1.jtkutest.com.au", "ns2.jtkutest.com.au" };
@ -77,12 +77,12 @@ void testFullUpdate()
DomainUpdateCommand cmd("jtkutest.com.au", &pw, &add, &rem, &registrantID);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><add><ns><hostObj>ns1.jtkutest.com.au</hostObj><hostObj>ns2.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"billing\">JTKCON3</contact><status s=\"clientHold\">non-payment</status></add><rem><ns><hostObj>ns3.jtkutest.com.au</hostObj><hostObj>ns4.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON2</contact><contact type=\"admin\">JTKCON</contact><status s=\"clientDeleteProhibited\"></status></rem><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><add><ns><hostObj>ns1.jtkutest.com.au</hostObj><hostObj>ns2.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON</contact><contact type=\"admin\">JTKCON2</contact><contact type=\"billing\">JTKCON3</contact><status s=\"clientHold\">non-payment</status></add><rem><ns><hostObj>ns3.jtkutest.com.au</hostObj><hostObj>ns4.jtkutest.com.au</hostObj></ns><contact type=\"tech\">JTKCON2</contact><contact type=\"admin\">JTKCON</contact><status s=\"clientDeleteProhibited\"></status></rem><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
void testSyncExpiryDateExtension(void)
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainUpdateCommand cmd("jtkutest.com.au");
@ -94,7 +94,7 @@ void testSyncExpiryDateExtension(void)
delete newExpiryDate;
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:sync-1.0\"><exDate>2005-04-03T22:00:00.0Z</exDate></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name></update></update><extension><update xmlns=\"urn:X-ar:params:xml:ns:sync-1.0\"><exDate>2005-04-03T22:00:00.0Z</exDate></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
void testSyncExpiryDateExtensionWithNullDate(void)

View File

@ -13,22 +13,22 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
HostCheckCommand hcc("ns1.jtkutest.com.au");
const string xml(hcc.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
std::vector<std::string> names;
names.push_back("ns1.jtkutest.com.au");
names.push_back("ns2.jtkutest.com.au");
HostCheckCommand hcc(names);
const string xml(hcc.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><name>ns2.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><check><check xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><name>ns2.jtkutest.com.au</name></check></check><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,16 +13,16 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
HostCreateCommand hcc("ns1.jtkutest.com.au");
const string xml(hcc.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></create></create><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></create></create><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
vector<InetAddress> addrs;
addrs.push_back(InetAddress("192.168.0.1", IPVersion::IPv4()));
@ -30,7 +30,7 @@ void doWork()
HostCreateCommand hcc("ns1.jtkutest.com.au", &addrs);
const string xml(hcc.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><addr ip=\"v4\">192.168.0.1</addr><addr ip=\"v6\">::1</addr></create></create><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name><addr ip=\"v4\">192.168.0.1</addr><addr ip=\"v6\">::1</addr></create></create><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,10 +13,10 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
HostDeleteCommand hcc("ns1.jtkutest.com.au");
const string xml(hcc.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></delete></delete><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><delete><delete xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></delete></delete><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -9,12 +9,12 @@ using namespace std;
void doWork()
{
init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
HostInfoCommand cmd("ns1.jtkutest.com.au");
const string xml = cmd.toXML();
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></info></info><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><info><info xmlns=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><name>ns1.jtkutest.com.au</name></info></info><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
}
int main(int argc, char* argv[])

View File

@ -21,39 +21,39 @@ void doWork()
init("./etc/toolkit2.conf");
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK");
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI></svcs></login><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", objURIs, extURIs);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>en</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", "1.0", "fr", objURIs, extURIs);
const string xml(cmd.toXML());
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
}
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
const string newPw("n(-w18PW*");
LoginCommand cmd("JTKUTEST", "1234abcd!@#$JTK", &newPw, "1.0", "fr", objURIs, extURIs);
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><newPW>n(-w18PW*</newPW><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><login><clID>JTKUTEST</clID><pw>1234abcd!@#$JTK</pw><newPW>n(-w18PW*</newPW><options><version>1.0</version><lang>fr</lang></options><svcs><objURI>urn:ietf:params:xml:ns:domain-1.0</objURI><objURI>urn:ietf:params:xml:ns:host-1.0</objURI><objURI>urn:ietf:params:xml:ns:contact-1.0</objURI><svcExtension><extURI>urn:au:params:xml:ns:auext-1.0</extURI></svcExtension></svcs></login><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -13,12 +13,12 @@ void doWork()
init("./etc/toolkit2.conf");
{
CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
LogoutCommand cmd;
const string xml(cmd.toXML());
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><logout/><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>");
ASSERT_EQ(xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><logout/><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>");
}
}

View File

@ -9,12 +9,12 @@ using namespace std;
void doWork()
{
init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
PollAckCommand cmd(123);
const string xml = cmd.toXML();
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><poll msgID=\"123\" op=\"ack\"/><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>", xml);
ASSERT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><poll msgID=\"123\" op=\"ack\"/><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>", xml);
}
int main(int argc, char* argv[])

View File

@ -13,7 +13,7 @@ using namespace std;
void testSecDNSAllFields()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
@ -34,13 +34,13 @@ void testSecDNSAllFields()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSMultipleDSDataWithoutMaxSigLife()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
@ -62,13 +62,13 @@ void testSecDNSMultipleDSDataWithoutMaxSigLife()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>38FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData><dsData><keyTag>6789</keyTag><alg>2</alg><digestType>2</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>38FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData><dsData><keyTag>6789</keyTag><alg>2</alg><digestType>2</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSAllFieldsMin()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
@ -89,13 +89,13 @@ void testSecDNSAllFieldsMin()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>1</maxSigLife><dsData><keyTag>0</keyTag><alg>0</alg><digestType>0</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>0</flags><protocol>0</protocol><alg>0</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>1</maxSigLife><dsData><keyTag>0</keyTag><alg>0</alg><digestType>0</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>0</flags><protocol>0</protocol><alg>0</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSAllFieldsMax()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
@ -116,13 +116,13 @@ void testSecDNSAllFieldsMax()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>2147483647</maxSigLife><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>2147483647</maxSigLife><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSJustKeyData()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
DomainCreateCommand createCommand("jtkutest.com.au", "jtkUT3st", NULL);
@ -141,7 +141,7 @@ void testSecDNSJustKeyData()
const string xml = createCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>65535</maxSigLife><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></create></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><create><create xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><authInfo><pw>jtkUT3st</pw></authInfo></create></create><extension><create xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><maxSigLife>65535</maxSigLife><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></create></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -13,7 +13,7 @@ using namespace std;
void testSecDNSAddFieldsUrgent()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -37,13 +37,13 @@ void testSecDNSAddFieldsUrgent()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><add><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></add></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><add><maxSigLife>604800</maxSigLife><dsData><keyTag>12345</keyTag><alg>3</alg><digestType>1</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>256</flags><protocol>3</protocol><alg>1</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveFieldsNotUrgent()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -65,13 +65,13 @@ void testSecDNSRemoveFieldsNotUrgent()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><rem><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></rem></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\"><rem><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></dsData></rem></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAll()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -90,13 +90,13 @@ void testSecDNSRemoveAll()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddDsData()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -120,13 +120,13 @@ void testSecDNSRemoveAllAndAddDsData()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></add></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><dsData><keyTag>65535</keyTag><alg>255</alg><digestType>255</digestType><digest>49FD46E6C4B45C55D4AC</digest></dsData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddKeyData()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -150,13 +150,13 @@ void testSecDNSRemoveAllAndAddKeyData()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}
void testSecDNSRemoveAllAndAddKeyDataAndChangeMaxSigLife()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CLTRID::setClID("JTKUTEST");
string passwd = "jtkUT3st";
@ -185,7 +185,7 @@ void testSecDNSRemoveAllAndAddKeyDataAndChangeMaxSigLife()
const string xml = updateCommand.toXML();
ASSERT_EQ(xml,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add><chg><maxSigLife>604800</maxSigLife></chg></update></extension><clTRID>JTKUTEST.20070101.010101.0</clTRID></command></epp>"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><command><update><update xmlns=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><name>jtkutest.com.au</name><chg><registrant>JTKCON</registrant><authInfo><pw>jtkUT3st</pw></authInfo></chg></update></update><extension><update xmlns=\"urn:ietf:params:xml:ns:secDNS-1.1\" urgent=\"true\"><rem><all>true</all></rem><add><keyData><flags>65535</flags><protocol>255</protocol><alg>255</alg><pubKey>AQPJ////4Q==</pubKey></keyData></add><chg><maxSigLife>604800</maxSigLife></chg></update></extension><clTRID>JTKUTEST.20140101.010101.0</clTRID></command></epp>"
);
}

View File

@ -9,7 +9,7 @@ using namespace std;
void testLoginCount()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
CommandCounter cc(5000);
ASSERT_EQ(0, cc.getTotal());
ASSERT_EQ(0, cc.getCount(StandardCommandType::LOGIN()));
@ -27,7 +27,7 @@ void testLoginCount()
void testMixedCommandsCount()
{
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
// 5 second 'recent' time.
CommandCounter cc(5000);
@ -49,7 +49,7 @@ void testMixedCommandsCount()
ASSERT_EQ(4, cc.getRecentExactTotal());
// 10 seconds later, which is greater than 5 seconds.
Timer::setTime("20070101.010111");
Timer::setTime("20140101.010111");
ASSERT_EQ(4, cc.getTotal());
ASSERT_EQ(4, cc.getRecentTotal());
@ -62,7 +62,7 @@ void testMixedCommandsCount()
void testPollCount()
{
Timer::setTime("");
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
// 5 second recent window.
CommandCounter cc(5000);
@ -73,16 +73,16 @@ void testPollCount()
ASSERT_EQ(1, cc.getRecentCount(StandardCommandType::POLL()));
// advance to 3sec
Timer::setTime("20070101.010103");
Timer::setTime("20140101.010103");
cc.increment(StandardCommandType::POLL());
ASSERT_EQ(2, cc.getRecentCount(StandardCommandType::POLL()));
// advance to 8sec, (1sec event gone)
Timer::setTime("20070101.010108");
Timer::setTime("20140101.010108");
ASSERT_EQ(1, cc.getRecentCount(StandardCommandType::POLL()));
// advance to 17sec (7 second event gone).
Timer::setTime("20070101.010117");
Timer::setTime("20140101.010117");
ASSERT_EQ(0, cc.getRecentCount(StandardCommandType::POLL()));
}

View File

@ -66,7 +66,7 @@ void doWork()
}
try {
Timer::setTime("20070101.010101");
Timer::setTime("20140101.010101");
op = "newInstance";
auto_ptr<SessionManager> manager(SessionManagerFactory::newInstance(&props));
op = "startup";

View File

@ -9,8 +9,8 @@ using namespace std;
int main(int argc, char* argv[])
{
const std::string bad_time = "123";
const std::string good_time = "20070101.010101";
const std::string good_time_string = "Mon Jan 1 01:01:01 2007\n";
const std::string good_time = "20140101.010101";
const std::string good_time_string = "Mon Jan 1 01:01:01 2014\n";
std::string timeString;
time_t time;

10
README
View File

@ -33,7 +33,9 @@
The git repo mirrors my Eclipse project.
Everything except the AusReg TK has been used
from the normal debian pkgs, so you can use
aptitude, dpkg etc, to examine on in your
unix account on the delivery host.
At first everything except the AusReg TK was gotten
from the normal debian pkgs. The working situation
2014-01 is more complicated than that but on a new host
(not necessarily debian) that should be done first.