This commit is contained in:
Ren RenJuan 2014-01-16 20:28:52 +00:00
parent ce131e87a0
commit dfca12d781
103 changed files with 125 additions and 1088 deletions

View File

@ -1,8 +1,8 @@
################################################## ##################################################
# Makefile for building lib and main test routine# # Makefile for building lib and main test routine#
################################################## ##################################################
#LOCATION=DEBIAN_7 LOCATION=DEBIAN_7
LOCATION=DEBIAN_6 #LOCATION=DEBIAN_6
#LOCATION=OSX_10_8 #LOCATION=OSX_10_8
SYSTEM = $(shell uname -s) SYSTEM = $(shell uname -s)
@ -100,20 +100,40 @@ $(BUILD_OBJ_DIR)/%.o: %.c
$(CC) $(CPPFLAGS) -c -o $@ $(INCLUDE_DIR) $< $(CC) $(CPPFLAGS) -c -o $@ $(INCLUDE_DIR) $<
LDFLAGS_TESTS = -L$(BUILD_LIB_DIR) -lACTK1_0 \ ARTKLIBS = -L$(BUILD_LIB_DIR) -lACTK1_0 \
-L$(XALAN_LIB_DIR) -lxalan-c -lxalanMsg \ -L$(XALAN_LIB_DIR) -lxalan-c -lxalanMsg \
-L$(XERCES_LIB_DIR) -lxerces-c \ -L$(XERCES_LIB_DIR) -lxerces-c \
-lssl \ -lssl \
-lrt -lrt
$(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.o $(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.o
$(CXX) $(LDFLAGS_TESTS) -o $@ $< $(CXX) $(ARTKLIBS) -o $@ $<
.PHONY: doc clean dclean .PHONY: doc clean dclean
####### Build rules
#libAusreg_EPP_toolkit.a: $(OBJECTS) #
# $(LIB_ARCHIVER) $(LIB_FLAGS) $(BUILD_LIB_DIR)/$@ $^ # The toolkit raises the c++ "static initialization fiasco" situation.
#
ARTKOBJS= build/XMLGregorianCalendar.o build/XMLParser.o build/XMLWriter.o build/ACSession.o build/DomainAddRem.o build/EnumDomainInfoResponse.o build/log.o build/PostalInfoType.o build/SessionManagerPropertiesImpl.o \
build/AddRemType.o build/DomainCheckResponse.o build/EnumDomainUpdateCommand.o build/LPECheckResponse.o build/Properties.o build/SessionPoolImpl.o \
build/boolean.o build/DomainCreateCommand.o build/EnumType.o build/LPECreateCommand.o build/ProtocolExtensionCommand.o build/SSLException.o \
build/CertificateUserMismatchException.o build/DomainCreateResponse.o build/EPPDateFormatter.o build/LPECreateResponse.o build/ReceiveSE.o build/StandardCommandType.o \
build/CheckResponse.o build/DomainInfoKVResponseExtension.o build/EPPWriter.o build/NamespaceResolver.o build/RegistrantObjectType.o build/StandardObjectType.o \
build/CLTRID.o build/DomainInfoResponse.o build/ErrorPkg.o build/NAPTR.o build/RegistrantTransferCommandType.o build/StringUtils.o \
build/CommandCounter.o build/DomainKVCommandExtension.o build/Greeting.o build/NotificationResponse.o build/ResponseExtension.o build/SyncExtension.o \
build/Command.o build/DomainNotificationResponse.o build/HostAddRem.o build/ObjectCommand.o build/Response.o build/SystemProperties.o \
build/config.o build/DomainRegistrantTransferCommand.o build/HostCheckResponse.o build/OteDomainInfoResponse.o build/ResultCounter.o build/Timer.o \
build/Constants.o build/DomainRegistrantTransferResponse.o build/HostCreateCommand.o build/OteDomainModifyRegistrantCommand.o build/Result.o build/TLSContext.o \
build/ContactCheckResponse.o build/DomainRenewCommand.o build/HostCreateResponse.o build/OteDomainObjectType.o build/SecDNSChgType.o build/TLSSession.o \
build/ContactCreateCommand.o build/DomainRenewResponse.o build/HostInfoResponse.o build/OteDomainTransferRegistrantCommand.o build/SecDNSDSData.o build/TLSSocket.o \
build/ContactCreateResponse.o build/DomainSecDNSCreateCommandExtension.o build/HostUpdateCommand.o build/OteDomainTransferRegistrantResponse.o build/SecDNSDSOrKeyType.o build/TransferCommand.o \
build/ContactInfoResponse.o build/DomainSecDNSInfoResponseExtension.o build/InetAddress.o build/OteExtension.o build/SecDNSExtension.o build/TransferOp.o \
build/ContactNotificationResponse.o build/DomainSecDNSUpdateCommandExtension.o build/InfoResponse.o build/OteLPECreateCommand.o build/SecDNSKeyData.o build/TransferResponse.o \
build/ContactTransferResponse.o build/DomainTransferResponse.o build/init.o build/Period.o build/SecDNSRemType.o build/UserPassMismatchException.o \
build/ContactUpdateCommand.o build/DomainUpdateCommand.o build/IPVersion.o build/PeriodUnit.o build/SendSE.o build/XMLDocument.o \
build/CreateResponse.o build/DomainUpdateSyncCommandExtension.o build/KVExtension.o build/PollOperation.o build/SessionFactory.o \
build/DataResponse.o build/E164Extension.o build/Logger.o build/PollResponse.o build/SessionManagerFactory.o \
build/Disclose.o build/EnumDomainCreateCommand.o build/LoginCommand.o build/PostalInfo.o build/SessionManagerImpl.o
.PHONY: tests .PHONY: tests
@ -126,8 +146,8 @@ dirs:
-mkdir -p $(BUILD_OBJ_DIR) -mkdir -p $(BUILD_OBJ_DIR)
libACTK1_0.so: libACTK1_0.so:
$(BUILD_LIB_DIR)/libACTK1_0.so: $(objs) $(BUILD_LIB_DIR)/libACTK1_0.so: $(objs)
$(CXX) $(LDFLAGS) $(PRODORDEV) -shared $^ -o $@ $(CXX) $(LDFLAGS) $(PRODORDEV) -shared $(ARTKOBJS) -o $@
doc: doc:
doxygen etc/Doxyfile doxygen etc/Doxyfile

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -12,7 +12,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:chkData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:cd><domain:name avail=\"1\">example.com</domain:name></domain:cd><domain:cd><domain:name avail=\"0\">example.net</domain:name><domain:reason>In use</domain:reason></domain:cd><domain:cd><domain:name avail=\"1\">example.org</domain:name></domain:cd></domain:chkData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:chkData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:cd><domain:name avail=\"1\">example.com</domain:name></domain:cd><domain:cd><domain:name avail=\"0\">example.net</domain:name><domain:reason>In use</domain:reason></domain:cd><domain:cd><domain:name avail=\"1\">example.org</domain:name></domain:cd></domain:chkData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>";

View File

@ -1,6 +1,6 @@
#ifndef __OTE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP #ifndef __OTE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP
#define __OTE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP #define __OTE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP
#include <iostream>
#include "common/Deprecated.hpp" #include "common/Deprecated.hpp"
#include "se/ProtocolExtensionCommand.hpp" #include "se/ProtocolExtensionCommand.hpp"
class XMLGregorianCalendar; class XMLGregorianCalendar;

View File

@ -9,7 +9,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string registrantName = "AusRegistry"; const string registrantName = "AusRegistry";
const string registrantID = "01241326211"; const string registrantID = "01241326211";

View File

@ -1,132 +0,0 @@
#include "se/AeDomainCreateCommand.hpp"
#include "xml/XMLHelper.hpp"
#include "se/AeExtension.hpp"
#include "common/ErrorPkg.hpp"
namespace {
Extension& aeExtension() {
static Extension* aeExtension = new AeExtension();
return *aeExtension;
}
}; // anonymous namespace
AeDomainCreateCommand::AeDomainCreateCommand (
const std::string& name,
const std::string& pw,
const std::string* registrantID,
const std::vector<std::string>* techContacts,
const std::string &aeEligibilityType,
int aePolicyReason,
const std::string &aeRegistrantName) : DomainCreateCommand (
name, pw, registrantID, techContacts)
{
setExtension (aeEligibilityType, aePolicyReason, aeRegistrantName);
}
AeDomainCreateCommand::AeDomainCreateCommand (
const std::string& name,
const std::string& pw,
const std::string* registrantID,
const std::vector<std::string>* techContacts,
const std::vector<std::string>* adminContacts,
const std::vector<std::string>* billingContacts,
const std::vector<std::string>* nameservers,
const Period* period,
const std::string &aeEligibilityType,
int aePolicyReason,
const std::string &aeRegistrantName,
const std::string *aeRegistrantID,
const std::string *aeRegistrantIDType,
const std::string *aeEligibilityName,
const std::string *aeEligibilityID,
const std::string *aeEligibilityIDType) : DomainCreateCommand (
name, pw, registrantID, techContacts, nameservers,
adminContacts, billingContacts, period)
{
setExtension (aeEligibilityType, aePolicyReason,
aeRegistrantName, aeRegistrantID, aeRegistrantIDType,
aeEligibilityName, aeEligibilityID, aeEligibilityIDType);
}
void AeDomainCreateCommand::setExtension (const std::string& eligibilityType,
int policyReason,
const std::string& registrantName)
{
setExtension (eligibilityType, policyReason, registrantName,
NULL, NULL, NULL, NULL, NULL);
}
void AeDomainCreateCommand::setExtension (
const std::string& eligibilityType,
int policyReason,
const std::string &registrantName,
const std::string* registrantID,
const std::string &registrantIDType)
{
setExtension (eligibilityType, policyReason, registrantName,
registrantID, &registrantIDType, NULL, NULL, NULL);
}
void AeDomainCreateCommand::setExtension (
const std::string& eligibilityType,
int policyReason,
const std::string& registrantName,
const std::string* registrantID,
const std::string* registrantIDType,
const std::string* eligibilityName,
const std::string* eligibilityID,
const std::string* eligibilityIDType)
{
if ((registrantID && registrantIDType == NULL)
|| (registrantID == NULL && registrantIDType)
|| (eligibilityID && eligibilityIDType == NULL)
|| (eligibilityID == NULL && eligibilityIDType))
{
throw IllegalArgException(ErrorPkg::getMessage(
"se.domaincreate.ae.missing_ar"));
}
DOMElement *aeextCreate = xmlWriter->appendChild(
xmlWriter->appendChild(
command,
"extension"),
"create",
aeExtension().getURI());
XMLHelper::setAttribute(aeextCreate,
"xsi:schemaLocation",
aeExtension().getSchemaLocation());
DOMElement* aeProperties = xmlWriter->appendChild(
aeextCreate, "aeProperties");
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "registrantName"),
registrantName);
if (registrantID && registrantIDType)
xmlWriter->appendChild (aeProperties,
"registrantID", *registrantID,
"type", *registrantIDType);
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "eligibilityType"),
eligibilityType);
if (eligibilityName)
{
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "eligibilityName"),
*eligibilityName);
if (eligibilityID && eligibilityIDType)
xmlWriter->appendChild(aeProperties,
"eligibilityID", *eligibilityID,
"type", *eligibilityIDType);
}
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "policyReason"),
policyReason);
}

View File

@ -1,150 +0,0 @@
#ifndef __AEDOMAINCREATECOMMAND_HPP
#define __AEDOMAINCREATECOMMAND_HPP
#include "common/Deprecated.hpp"
#include "se/DomainCreateCommand.hpp"
/**
* Extension of EPP urn:ietf:params:xml:ns:domain-1.0 create command specified
* in RFC3731 to urn:X-ae:params:xml:ns:aeext-1.0. .ae domains must be
* provisioned using this class rather than {@link DomainCreateCommand}, as the
* ae extension data is mandatory.
* Use this class to generate a standards-compliant XML document, given simple
* input parameters. The toXML method in Command serialises this object to
* XML.
* The response expected from a server should be handled by a {@link
* DomainCreateResponse} object.
*
* @deprecated AE eligibility extensions should now be managed through the
* @c <kvlist> extension defined in the
* <tt>urn:X-ar:params:xml:ns:kv-1.0</tt> namespace. This can be done
* through the toolkit by using a @c DomainCreateCommand and
* appending a @c DomainKVCommandExtension object containing
* the AE eligibility extensions.
*
* See
* {@link DomainCreateCommand.appendExtension(CommandExtension)}
* and
* {@link DomainKVCommandExtension}.
*/
class AeDomainCreateCommand : public DomainCreateCommand
{
public:
/**
* Minimal constructor for creating a domain:create + aeext:create
* EPP command. These parameters are the least required for a valid
* .ae domain create command.
*/
DEPRECATED(
AeDomainCreateCommand (const std::string& name,
const std::string& pw,
const std::string* registrantID,
const std::vector<std::string>* techContacts,
const std::string &aeEligibilityType,
int aePolicyReason,
const std::string& aeRegistrantName));
/**
* Full data specification constructor for a domain:create + aeext:create
* EPP command. Please refer to the urn:X-ae:params:xml:ns:aeext-1.0 schema
* for specification of the required fields.
* The mapping of parameter names to ae extension fields is given in the
* parameter documentation.
*
* @param name The name of the new domain.
*
* @param pw The password to assign to the domain (also known as authInfo
* or authorisation information).
*
* @param registrantID The identifier of an existing contact to assign as
* the registrant contact for this domain. Failure to ensure the contact
* exists prior to using them in this way will result in an EPP result of
* '2303 "Object does not exist"'.
*
* @param techContacts The identifiers of existing contacts to assign as
* technical contacts for this domain. Failure to ensure the contacts
* exist prior to using them in this way will result in an EPP result of
* '2303 "Object does not exist"'.
*
* @param adminContacts See techContacts (substitute administrative for
* technical).
*
* @param billingContacts See techContacts (substitute billing for
* technical).
*
* @param nameservers The names of existing hosts to delegate the domain
* being created to. Failure to ensure the hosts exist prior to using them
* in this way will result in an EPP result of '2303 "Object does not
* exist"'.
*
* @param period The initial registration period of the domain object. A
* server may define a default initial registration period if not specified
* by the client.
*
* @param aeEligibilityType aeext:eligType.
*
* @param aePolicyReason aeext:policyReason.
*
* @param aeRegistrantName aeext:registrantName.
*
* @param aeRegistrantID aeext:registrantID.
*
* @param aeRegistrantIDType aeext:registrantID type attribute.
*
* @param aeEligibilityName aeext:eligibilityName.
*
* @param aeEligibilityID aeext:eligibilityID.
*
* @param aeEligibilityIDType aeext:eligibilityID type attribute.
*/
DEPRECATED(
AeDomainCreateCommand (const std::string& name,
const std::string& pw,
const std::string* registrantID,
const std::vector<std::string>* techContacts,
const std::vector<std::string>* adminContacts,
const std::vector<std::string>* billingContacts,
const std::vector<std::string>* nameservers,
const Period *period,
const std::string &aeEligibilityType,
int aePolicyReason,
const std::string& aeRegistrantName,
const std::string* aeRegistrantID,
const std::string* aeRegistrantIDType,
const std::string* aeEligibilityName,
const std::string* aeEligibilityID,
const std::string* aeEligibilityIDType));
private:
void setExtension (const std::string& eligibilityType,
int PolicyReason,
const std::string& registrantName);
void setExtension (const std::string& eligibilityType,
int PolicyReason,
const std::string& registrantName,
const std::string* registrantID,
const std::string& registrantIDType);
/**
* &lt;extension&gt;
* &nbsp;&lt;create xmlns="urn:X-ae:params:xml:ns:aeext-1.0"&gt;
* &nbsp;&nbsp;&lt;registrantName&gt;registrantName&lt;/registrantName&gt;
* &nbsp;&nbsp;&lt;registrantID type="registrantIDType"&gt;registrantID&lt;/registrantID&gt;
* &nbsp;&nbsp;&lt;eligibilityType&gt;eligibilityType&lt;/eligibilityType&gt;
* &nbsp;&nbsp;&lt;eligibilityName&gt;eligibilityName&lt;/eligibilityName&gt;
* &nbsp;&nbsp;&lt;eligibilityID type="eligibilityIDType"&gt;eligibilityID&lt;/eligibilityID&gt;
* &nbsp;&nbsp;&lt;policyReason&gt;policyReason&lt;/policyReason&gt;
* &nbsp;&lt;/create&gt;
* &lt;/extension&gt;
*/
void setExtension (const std::string& eligibilityType,
int policyReason,
const std::string& registrantName,
const std::string* registrantID,
const std::string* registrantIDType,
const std::string* eligibilityName,
const std::string* eligibilityID,
const std::string* eligibilityIDType);
};
#endif // __AEDOMAINCREATECOMMAND_HPP

View File

@ -1,86 +0,0 @@
#include "se/ContactCheckCommand.hpp"
#include "se/AeDomainCreateCommand.hpp"
#include "se/CLTRID.hpp"
#include "session/Timer.hpp"
#include "common/init.hpp"
#include "common/Test.hpp"
using namespace std;
void doWork()
{
init("/home/drde/etc/toolkit2.conf");
const string registrantName = "AusRegistry";
const string registrantID = "01241326211";
const string registrantIDType = "Trade License";
const string eligibilityType = "Trade License (IT)";
const int policyReason = 1;
const string eligibilityName = "Blah";
const string eligibilityID = "1231239523";
const string eligibilityIDType = "Trademark";
/**
* Test that the XML string generated for a minimal create domain command
* matches the expected XML for an EPP create domain command with those
* parameters.
*/
{
Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST");
vector<string> techIds;
techIds.push_back("JTKCON2");
string registrant("JTKCON");
AeDomainCreateCommand cmd("jtkutest.co.ae", "jtkUT3st", &registrant, &techIds,
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>");
}
/**
* Test that the XML string generated for a sample create domain command
* specified with all available parameters matches the expected XML for
* an EPP create domain command with those parameters.
*
*/
{
Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST");
vector<string> techIds;
techIds.push_back("JTKCON2");
vector<string> adminContacts;
adminContacts.push_back("JTKCON");
adminContacts.push_back("JTKCON2");
string registrant("JTKCON");
vector<string> nameServers;
nameServers.push_back("ns1.ausregistry.net");
nameServers.push_back("ns2.ausregistry.net");
Period period(48, PeriodUnit::MONTHS());
AeDomainCreateCommand cmd(
"jtkutest.co.ae", "jtkUT3st", &registrant,
&techIds, &adminContacts,
NULL, &nameServers, &period,
eligibilityType, policyReason,
registrantName, &registrantID,
&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>");
}
}
int main(int argc, char* argv[])
{
TEST_run(doWork);
return TEST_errorCount();
}

View File

@ -1,57 +0,0 @@
#include "se/AeDomainInfoResponse.hpp"
#include "se/StandardObjectType.hpp"
#include <stdlib.h> // atoi()
using namespace std;
const std::string AeDomainInfoResponse::AEEXT_EXPR(Response::RESPONSE_EXPR() + "/e:extension/aeext:infData");
const std::string AeDomainInfoResponse::AE_PROPERTIES_EXPR(AeDomainInfoResponse::AEEXT_EXPR + "/aeext:aeProperties");
const std::string AeDomainInfoResponse::AE_REGISTRANT_NAME_EXPR(AeDomainInfoResponse::AE_PROPERTIES_EXPR + "/aeext:registrantName/text()");
const std::string AeDomainInfoResponse::AE_REGISTRANT_ID_EXPR(AeDomainInfoResponse::AE_PROPERTIES_EXPR + "/aeext:registrantID/text()");
const std::string AeDomainInfoResponse::AE_REGISTRANT_ID_TYPE_EXPR(AeDomainInfoResponse::AE_PROPERTIES_EXPR + "/aeext:registrantID/@type");
const std::string AeDomainInfoResponse::AE_ELI_TYPE_EXPR(AeDomainInfoResponse::AE_PROPERTIES_EXPR + "/aeext:eligibilityType/text()");
const std::string AeDomainInfoResponse::AE_ELI_NAME_EXPR(AeDomainInfoResponse::AE_PROPERTIES_EXPR + "/aeext:eligibilityName/text()");
const std::string AeDomainInfoResponse::AE_ELI_ID_EXPR(AeDomainInfoResponse::AE_PROPERTIES_EXPR + "/aeext:eligibilityID/text()");
const std::string AeDomainInfoResponse::AE_ELI_ID_TYPE_EXPR(AeDomainInfoResponse::AE_PROPERTIES_EXPR + "/aeext:eligibilityID/@type");
const std::string AeDomainInfoResponse::AE_POLICY_REASON_EXPR(AeDomainInfoResponse::AE_PROPERTIES_EXPR + "/aeext:policyReason/text()");
AeDomainInfoResponse::AeDomainInfoResponse() : DomainInfoResponse()
{
policyReason = 0;
}
void AeDomainInfoResponse::fromXML (XMLDocument *xmlDoc) throw (ParsingException)
{
DomainInfoResponse::fromXML(xmlDoc);
if (!(resultArray[0].succeeded())) {
return;
}
try
{
registrantName = xmlDoc->getNodeValue (AE_REGISTRANT_NAME_EXPR);
registrantID = xmlDoc->getNodeValue (AE_REGISTRANT_ID_EXPR);
registrantIDType = xmlDoc->getNodeValue (AE_REGISTRANT_ID_TYPE_EXPR);
eligibilityType = xmlDoc->getNodeValue (AE_ELI_TYPE_EXPR);
eligibilityName = xmlDoc->getNodeValue (AE_ELI_NAME_EXPR);
eligibilityID = xmlDoc->getNodeValue (AE_ELI_ID_EXPR);
eligibilityIDType = xmlDoc->getNodeValue (AE_ELI_ID_TYPE_EXPR);
string polReasonStr = xmlDoc->getNodeValue (AE_POLICY_REASON_EXPR);
if (polReasonStr.length() > 0) {
policyReason = atoi (polReasonStr.c_str());
}
}
catch (XPathExpressionException& e)
{
maintLogger->warning(e.getMessage());
ParsingException pe("Could not parse AeDomainInfoResponse object.");
pe.causedBy(e);
throw pe;
}
}

View File

@ -1,72 +0,0 @@
#ifndef __AE_DOMAIN_INFO_RESPONSE_HPP
#define __AE_DOMAIN_INFO_RESPONSE_HPP
#include "common/Deprecated.hpp"
#include "se/DomainInfoResponse.hpp"
#include <string>
/**
* Extension of the domain mapping of the EPP info response, as defined in
* RFC3730 and RFC3731, to .ae domain names, the specification of which is in
* the XML schema definition urn:X-ae:params:xml:ns:aeext-1.0.
* Instances of this class provide an interface to access all of the
* information available through EPP for a .ae domain name.
* This relies on the instance first being initialised by a suitable EPP domain
* info response using the method fromXML. For flexibility, this
* implementation extracts the data from the response using XPath queries, the
* expressions for which are defined statically.
* @deprecated AE eligibility extensions should now be managed through the
* @c <kvlist> extension defined in the
* <tt>urn:X-ar:params:xml:ns:kv-1.0</tt> namespace. This can be done
* through the toolkit by using a @c DomainInfoResponse and
* registering a @c DomainInfoKVResponseExtension object, which
* will contain the AE eligibility extensions.
*
* See
* {@link DomainInfoResponse.registerExtension(ResponseExtension)}
* and
* {@link DomainInfoKVResponseExtension}.
*/
class AeDomainInfoResponse : public DomainInfoResponse
{
public:
DEPRECATED(AeDomainInfoResponse());
const std::string& getRegistrantName() const { return registrantName; };
const std::string& getAERegistrantID() const { return registrantID; };
const std::string& getRegistrantIDType() const { return registrantIDType; };
const std::string& getEligibilityType() const { return eligibilityType; };
const std::string& getEligibilityName() const { return eligibilityName; };
const std::string& getEligibilityID() const { return eligibilityID; };
const std::string& getEligibilityIDType() const { return eligibilityIDType; };
int getPolicyReason() const { return policyReason; };
virtual void fromXML (XMLDocument *xmlDoc) throw (ParsingException);
private:
static const std::string AEEXT_EXPR,
AE_PROPERTIES_EXPR,
AE_REGISTRANT_NAME_EXPR,
AE_REGISTRANT_ID_EXPR,
AE_REGISTRANT_ID_TYPE_EXPR,
AE_ELI_TYPE_EXPR,
AE_ELI_NAME_EXPR,
AE_ELI_ID_EXPR,
AE_ELI_ID_TYPE_EXPR,
AE_POLICY_REASON_EXPR;
std::string registrantName,
registrantID,
registrantIDType,
eligibilityType,
eligibilityName,
eligibilityID,
eligibilityIDType;
int policyReason;
};
#endif // __AE_DOMAIN_INFO_RESPONSE_HPP

View File

@ -1,93 +0,0 @@
#include "se/AeDomainModifyRegistrantCommand.hpp"
#include "common/ErrorPkg.hpp"
#include "se/AeExtension.hpp"
#include "xml/XMLHelper.hpp"
namespace {
AeExtension& aeExtension() {
static AeExtension* aeExtension = new AeExtension();
return *aeExtension;
}
}; // anonymous namespace
AeDomainModifyRegistrantCommand::AeDomainModifyRegistrantCommand(
const std::string& name,
const std::string& registrantName,
const std::string& explanation,
const std::string* eligibilityType,
int policyReason,
const std::string* registrantID,
const std::string* registrantIDType,
const std::string* eligibilityName,
const std::string* eligibilityID,
const std::string* eligibilityIDType) : DomainUpdateCommand(name)
{
if (eligibilityType == NULL
|| (registrantID == NULL && registrantIDType != NULL)
|| (registrantID != NULL && registrantIDType == NULL)
|| (eligibilityID == NULL && eligibilityIDType != NULL)
|| (eligibilityID != NULL && eligibilityIDType == NULL))
{
throw IllegalArgException(
ErrorPkg::getMessage("se.domain.modify.ae.missing_arg"));
}
DOMElement* aeextUpdate = xmlWriter->appendChild(
xmlWriter->appendChild(command, "extension"),
"update",
aeExtension().getURI());
aeextUpdate->setAttribute(
XStr("xsi:schemaLocation").str(),
XStr(aeExtension().getSchemaLocation()).str());
DOMElement* aeProperties = xmlWriter->appendChild(aeextUpdate,
"aeProperties");
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "registrantName"),
registrantName);
if (registrantID != NULL && registrantIDType != NULL)
{
xmlWriter->appendChild(
aeProperties,
"registrantID",
*registrantID,
"type",
*registrantIDType);
}
if (eligibilityType != NULL)
{
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "eligibilityType"),
*eligibilityType);
}
if (eligibilityName != NULL)
{
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "eligibilityName"),
*eligibilityName);
}
if (eligibilityID != NULL && eligibilityIDType != NULL)
{
xmlWriter->appendChild(
aeProperties,
"eligibilityID",
*eligibilityID,
"type",
*eligibilityIDType);
}
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "policyReason"),
policyReason);
XMLHelper::setTextContent(
xmlWriter->appendChild(aeextUpdate, "explanation"),
explanation);
}

View File

@ -1,46 +0,0 @@
#ifndef __AE_DOMAIN_MODIFY_REGISTRANT_COMMAND_HPP
#define __AE_DOMAIN_MODIFY_REGISTRANT_COMMAND_HPP
#include "common/Deprecated.hpp"
#include "se/DomainUpdateCommand.hpp"
/**
* An extension of the domain mapping of the EPP update command, as defined in
* RFC3730 and RFC3731, to .ae domain names, the specification of which is in
* the XML schema definition urn:X-ae:params:xml:ns:aeext-1.0.
* This class should only be used to correct ae extension data for .ae domain
* names, and only where the legal registrant has not changed.
* Use this class to generate a standards-compliant XML document, given simple
* input parameters. The toXML method in Command serialises this object to
* XML.
*
* @deprecated AE eligibility extensions should now be managed through the
* @c <kvlist> extension defined in the
* <tt>urn:X-ar:params:xml:ns:kv-1.0</tt> namespace. This can be done
* through the toolkit by using a @c DomainUpdateCommand and
* appending a @c DomainKVCommandExtension object containing
* the AE eligibility extensions.
*
* See
* {@link DomainUpdateCommand.appendExtension(CommandExtension)}
* and
* {@link DomainKVCommandExtension}.
*/
class AeDomainModifyRegistrantCommand : public DomainUpdateCommand
{
public:
DEPRECATED(
AeDomainModifyRegistrantCommand(const std::string& name,
const std::string& registrantName,
const std::string& explanation,
const std::string* eligibilityType = NULL,
int policyReason = 0,
const std::string* registrantID = NULL,
const std::string* registrantIDType = NULL,
const std::string* eligibilityName = NULL,
const std::string* eligibilityID = NULL,
const std::string* eligibilityIDType = NULL));
};
#endif // __AE_DOMAIN_MODIFY_REGISTRANT_COMMAND_HPP

View File

@ -1,25 +0,0 @@
#include "AeDomainObjectType.hpp"
#include <string>
const std::string& AeDomainObjectType::getName() const {
static const std::string name = "aedom";
return name;
}
const std::string& AeDomainObjectType::getURI() const {
static const std::string uri = "urn:X-ae:params:xml:ns:aedomain-1.0";
return uri;
}
const std::string& AeDomainObjectType::getSchemaLocation() const {
static const std::string schemaLocation =
"urn:X-ae:params:xml:ns:aedomain-1.0 aedomain-1.0.xsd";
return schemaLocation;
}
const std::string& AeDomainObjectType::getIdentType() const {
static const std::string ident = "name";
return ident;
}

View File

@ -1,19 +0,0 @@
#ifndef AEDOMAIN_OBJECT_TYPE
#define AEDOMAIN_OBJECT_TYPE
#include "ObjectType.hpp"
#include <string>
class AeDomainObjectType : public ObjectType {
public:
virtual ~AeDomainObjectType(void) { }
virtual const std::string& getName() const;
virtual const std::string& getURI() const;
virtual const std::string& getSchemaLocation() const;
virtual const std::string& getIdentType() const;
};
#endif // AEDOMAIN_OBJECT_TYPE

View File

@ -1,92 +0,0 @@
#include "se/AeDomainTransferRegistrantCommand.hpp"
#include "se/XMLGregorianCalendar.hpp"
#include "se/AeExtension.hpp"
#include "se/AeDomainObjectType.hpp"
#include "se/RegistrantTransferCommandType.hpp"
#include "se/CommandType.hpp"
#include "se/Period.hpp"
#include "common/ErrorPkg.hpp"
#include "se/EPPDateFormatter.hpp"
#include "xml/XMLHelper.hpp"
namespace {
Extension& aeExtension() {
static Extension* aeExt = new AeExtension();
return *aeExt;
}
const RegistrantTransferCommandType rtrnType;
AeDomainObjectType aedomType;
} // anonymous namespace
AeDomainTransferRegistrantCommand::AeDomainTransferRegistrantCommand (
const std::string& name,
const XMLGregorianCalendar& curExpDate,
const std::string& eligibilityType,
int policyReason,
const std::string& registrantName,
const std::string& explanation,
const std::string* registrantID,
const std::string* registrantIDType,
const std::string* eligibilityName,
const std::string* eligibilityID,
const std::string* eligibilityIDType,
const Period* period) : ProtocolExtensionCommand(
&rtrnType, &aedomType, name, aeExtension())
{
if ((registrantID && registrantIDType == NULL)
|| (registrantIDType == NULL && registrantIDType)
|| (eligibilityName && (eligibilityID == NULL || eligibilityIDType == NULL))
|| (eligibilityName == NULL && (eligibilityID || eligibilityIDType)))
{
// If provided, a registrantID must have a type.
// If provided, an eligibilityName must have both an eligibilityID and type.
throw IllegalArgException(
ErrorPkg::getMessage("se.domain.registrantTransfer.ae.missing_arg"));
}
DOMElement *element;
std::string curExpDateStr = EPPDateFormatter::toXSDate(curExpDate);
XMLHelper::setTextContent(
xmlWriter->appendChild(objElement, "curExpDate"), curExpDateStr);
if (period)
period->appendPeriod(xmlWriter, objElement);
DOMElement *aeProperties = xmlWriter->appendChild(objElement, "aeProperties");
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "registrantName"), registrantName);
if (registrantID)
{
element = xmlWriter->appendChild(aeProperties, "registrantID");
XMLHelper::setTextContent(element, *registrantID);
XMLHelper::setAttribute(element, "type", *registrantIDType);
}
XMLHelper::setTextContent
(xmlWriter->appendChild(aeProperties, "eligibilityType"), eligibilityType);
if (eligibilityName)
{
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "eligibilityName"), *eligibilityName);
element = xmlWriter->appendChild(aeProperties, "eligibilityID");
XMLHelper::setTextContent(element, *eligibilityID);
XMLHelper::setAttribute(element, "type", *eligibilityIDType);
}
XMLHelper::setTextContent(
xmlWriter->appendChild(aeProperties, "policyReason"),
policyReason);
XMLHelper::setTextContent(
xmlWriter->appendChild(objElement, "explanation"),
explanation);
}

View File

@ -1,88 +0,0 @@
#ifndef __AE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP
#define __AE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP
#include "common/Deprecated.hpp"
#include "se/ProtocolExtensionCommand.hpp"
class XMLGregorianCalendar;
class Period;
/**
* In cases where the legal registrant of a .ae domain name has changed, this
* class should be used to request a transfer of registrant. This is a
* different action to correcting extension data which was originally specified
* incorrectly, and should only be used in the situation described. This
* command will result in the validity period of the domain name being updated
* and the requesting client being charged the usual create fee upon success of
* this operation.
* Use this class to generate a standards-compliant XML document, given simple
* input parameters. The toXML method in Command serialises this object to
* XML.
* @deprecated AE eligibility extensions should now be managed through the
* @c <kvlist> extension defined in the
* <tt>urn:X-ar:params:xml:ns:kv-1.0</tt> namespace. The Registrant
* Transfer command that utilises this extension is defined in the
* <tt>urn:X-ar:params:xml:ns:registrant-1.0</tt> namespace. This can
* be done through the toolkit by using a
* @c DomainRegistrantTransferCommand and specifying
* @c "ae" as the kvListName.
*
* See
* {@link DomainRegistrantTransferCommand}
* and
* {@link DomainRegistrantTransferCommand.addItem(std::string, std::string)}
*/
class AeDomainTransferRegistrantCommand : public ProtocolExtensionCommand
{
public:
/**
* Request that the named .ae domain name be transferred to the legal
* entity specified by the given ae extension data.
*
* @param name The domain name to transfer.
*
* @param curExpDate The current expiry of the identified domain name.
* This is required in order to prevent repeated transfer of the name due
* to protocol transmission failures.
*
* @param eligibilityType
*
* @param policyReason
*
* @param registrantName
*
* @param explanation An explanation of how the transfer was effected.
*
* @param registrantID
*
* @param registrantIDType
*
* @param eligibilityName
*
* @param eligibilityID
*
* @param eligibilityIDType
*
* @param period The desired new validity period, starting from the time
* the transfer completes successfully.
*
* @param explanation An explanation of how the transfer was effected.
*/
DEPRECATED(
AeDomainTransferRegistrantCommand (const std::string& name,
const XMLGregorianCalendar& curExpDate,
const std::string& eligibilityType,
int policyReason,
const std::string& registrantName,
const std::string& explanation,
const std::string* registrantID = NULL,
const std::string* registrantIDType = NULL,
const std::string* eligibilityName = NULL,
const std::string* eligibilityID = NULL,
const std::string* eligibilityIDType = NULL,
const Period* period = NULL));
};
#endif // __AE_DOMAIN_TRANSFER_REGISTRANT_COMMAND_HPP

View File

@ -1,37 +0,0 @@
#include "se/AeDomainTransferRegistrantResponse.hpp"
#include "se/AeDomainObjectType.hpp"
#include "se/RegistrantTransferCommandType.hpp"
#include "se/EPPDateFormatter.hpp"
namespace {
const RegistrantTransferCommandType rtrnType;
AeDomainObjectType aedomType;
} // anonymous namespace
using namespace std;
const string AeDomainTransferRegistrantResponse::AEDOM_NAME_EXPR =
"/e:epp/e:response/e:resData/aedom:rtrnData/aedom:name/text()";
const string AeDomainTransferRegistrantResponse::AEDOM_EX_DATE_EXPR =
"/e:epp/e:response/e:resData/aedom:rtrnData/aedom:exDate/text()";
AeDomainTransferRegistrantResponse::AeDomainTransferRegistrantResponse()
: DataResponse(&rtrnType, &aedomType)
{
}
void AeDomainTransferRegistrantResponse::fromXML(XMLDocument* xmlDoc) throw (ParsingException)
{
DataResponse::fromXML(xmlDoc);
if (!(resultArray[0].succeeded())) {
return;
}
name = xmlDoc->getNodeValue(AEDOM_NAME_EXPR);
std::string exDateStr = xmlDoc->getNodeValue(AEDOM_EX_DATE_EXPR);
exDate = std::auto_ptr<XMLGregorianCalendar>(
EPPDateFormatter::fromXSDateTime(exDateStr));
}

View File

@ -1,44 +0,0 @@
#ifndef __AE_DOMAIN_TRANSFER_REGISTRANT_RESPONSE
#define __AE_DOMAIN_TRANSFER_REGISTRANT_RESPONSE
#include "common/Deprecated.hpp"
#include "se/DataResponse.hpp"
#include "se/XMLGregorianCalendar.hpp"
/**
* Use this to access create data for a domain as provided in an EPP domain
* create response compliant with RFCs 3730 and 3731. Such a service element
* is sent by a compliant EPP server in response to a valid domain create
* command, implemented by the DomainCreateCommand.
*
* @see DomainCreateCommand
* @deprecated Performing a registrant transfer with AE eligibility extensions
* should now be managed through the use of the
* @c DomainRegistrantTransferCommand and
* @c DomainRegistrantTransferResponse
*
* See
* {@link DomainRegistrantTransferCommand}
* and
* {@link DomainRegistrantTransferResponse}.
*/
class AeDomainTransferRegistrantResponse : public DataResponse
{
public:
DEPRECATED(AeDomainTransferRegistrantResponse());
const std::string& getName() { return name; }
const XMLGregorianCalendar* getExpiryDate() { return exDate.get(); }
void fromXML(XMLDocument* xmlDoc) throw (ParsingException);
private:
static const std::string AEDOM_NAME_EXPR;
static const std::string AEDOM_EX_DATE_EXPR;
std::string name;
std::auto_ptr<XMLGregorianCalendar> exDate;
};
#endif // __AE_DOMAIN_TRANSFER_REGISTRANT_RESPONSE

View File

@ -1,14 +0,0 @@
#include "se/AeExtension.hpp"
std::string& AeExtension::getURI() const
{
static std::string uri = "urn:X-ae:params:xml:ns:aeext-1.0";
return uri;
}
std::string& AeExtension::getSchemaLocation() const
{
static std::string loc = "urn:X-ae:params:xml:ns:aeext-1.0 aeext-1.0.xsd";
return loc;
}

View File

@ -1,29 +0,0 @@
#ifndef __AEEXTENSION_HPP
#define __AEEXTENSION_HPP
#include "se/Extension.hpp"
/**
* A bundled set of constants representing the .ae EPP extension
* schema. The namespace URI uniquely identifies the extension.
*/
class AeExtension : public Extension
{
public:
virtual ~AeExtension(void) { }
/**
* Get the globally unique namespace URI which identifies this extension.
*/
virtual std::string& getURI() const;
/**
* Get the location hint for the XML schema used to validate EPP service
* element instances using this extension.
*/
virtual std::string& getSchemaLocation() const;
};
#endif // __AEEXTENSION_HPP

View File

@ -8,7 +8,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -8,7 +8,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><contact:chkData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><contact:cd><contact:id avail=\"1\">sh8013</contact:id></contact:cd><contact:cd><contact:id avail=\"0\">sah8013</contact:id><contact:reason>In use</contact:reason></contact:cd><contact:cd><contact:id avail=\"1\">8013sah</contact:id></contact:cd></contact:chkData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"; const string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><contact:chkData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><contact:cd><contact:id avail=\"1\">sh8013</contact:id></contact:cd><contact:cd><contact:id avail=\"0\">sah8013</contact:id><contact:reason>In use</contact:reason></contact:cd><contact:cd><contact:id avail=\"1\">8013sah</contact:id></contact:cd></contact:chkData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>";

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -13,7 +13,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml( const string xml(
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><contact:infData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><contact:id>sh8013</contact:id><contact:roid>SH8013-REP</contact:roid><contact:status s=\"linked\"/><contact:status s=\"clientDeleteProhibited\"/><contact:postalInfo type=\"int\"><contact:name>John Doe</contact:name><contact:org>Example Inc.</contact:org><contact:addr><contact:street>123 Example Dr.</contact:street><contact:street>Suite 100</contact:street><contact:city>Dulles</contact:city><contact:sp>VA</contact:sp><contact:pc>20166-6503</contact:pc><contact:cc>US</contact:cc></contact:addr></contact:postalInfo><contact:voice x=\"1234\">+1.7035555555</contact:voice><contact:fax>+1.7035555556</contact:fax><contact:email>jdoe@example.com</contact:email><contact:clID>ClientY</contact:clID><contact:crID>ClientX</contact:crID><contact:crDate>1999-04-03T22:00:00.0Z</contact:crDate><contact:upID>ClientX</contact:upID><contact:upDate>1999-12-03T09:00:00.0Z</contact:upDate><contact:trDate>2000-04-08T09:00:00.0Z</contact:trDate><contact:authInfo><contact:pw>2fooBAR</contact:pw></contact:authInfo></contact:infData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"); "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><contact:infData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><contact:id>sh8013</contact:id><contact:roid>SH8013-REP</contact:roid><contact:status s=\"linked\"/><contact:status s=\"clientDeleteProhibited\"/><contact:postalInfo type=\"int\"><contact:name>John Doe</contact:name><contact:org>Example Inc.</contact:org><contact:addr><contact:street>123 Example Dr.</contact:street><contact:street>Suite 100</contact:street><contact:city>Dulles</contact:city><contact:sp>VA</contact:sp><contact:pc>20166-6503</contact:pc><contact:cc>US</contact:cc></contact:addr></contact:postalInfo><contact:voice x=\"1234\">+1.7035555555</contact:voice><contact:fax>+1.7035555556</contact:fax><contact:email>jdoe@example.com</contact:email><contact:clID>ClientY</contact:clID><contact:crID>ClientX</contact:crID><contact:crDate>1999-04-03T22:00:00.0Z</contact:crDate><contact:upID>ClientX</contact:upID><contact:upDate>1999-12-03T09:00:00.0Z</contact:upDate><contact:trDate>2000-04-08T09:00:00.0Z</contact:trDate><contact:authInfo><contact:pw>2fooBAR</contact:pw></contact:authInfo></contact:infData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>");

View File

@ -12,7 +12,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -12,7 +12,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:chkData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:cd><domain:name avail=\"1\">example.com</domain:name></domain:cd><domain:cd><domain:name avail=\"0\">example.net</domain:name><domain:reason>In use</domain:reason></domain:cd><domain:cd><domain:name avail=\"1\">example.org</domain:name></domain:cd></domain:chkData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:chkData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:cd><domain:name avail=\"1\">example.com</domain:name></domain:cd><domain:cd><domain:name avail=\"0\">example.net</domain:name><domain:reason>In use</domain:reason></domain:cd><domain:cd><domain:name avail=\"1\">example.org</domain:name></domain:cd></domain:chkData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>";

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -113,7 +113,7 @@ void checkKeyValueList(const DomainInfoKVResponseExtension &kvExtension, const s
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testNonExistentListName); TEST_run(testNonExistentListName);
TEST_run(testNonExistentItem); TEST_run(testNonExistentItem);
TEST_run(testNotInitialisedWhenNoKVExtensionPresent); TEST_run(testNotInitialisedWhenNoKVExtensionPresent);

View File

@ -82,7 +82,7 @@ void addSampleItemsToExtension(DomainKVCommandExtension &extension, const string
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testUpdateSingleKVList); TEST_run(testUpdateSingleKVList);
TEST_run(testCreateSingleKVList); TEST_run(testCreateSingleKVList);
TEST_run(testMultipleKVList); TEST_run(testMultipleKVList);

View File

@ -2,7 +2,7 @@
#define DOMAIN_REGISTRANT_TRANSFER_COMMAND_HPP_ #define DOMAIN_REGISTRANT_TRANSFER_COMMAND_HPP_
#include <string> #include <string>
#include <iostream>
#include "se/Command.hpp" #include "se/Command.hpp"
#include "se/KVDefs.hpp" #include "se/KVDefs.hpp"

View File

@ -16,7 +16,7 @@ const static std::string policyReason = "1";
const static std::string eligibilityName = "Blah"; const static std::string eligibilityName = "Blah";
const static std::string eligibilityIDValue = "1231239523"; const static std::string eligibilityIDValue = "1231239523";
const static std::string eligibilityIDType = "Trademark"; const static std::string eligibilityIDType = "Trademark";
const auto_ptr<XMLGregorianCalendar> curExpDate(EPPDateFormatter::fromXSDateTime("2007-01-01T01:01:01.0Z")); const auto_ptr<XMLGregorianCalendar> curExpDate(EPPDateFormatter::fromXSDateTime("2014-01-01T01:01:01.0Z"));
const static std::string kvListName = "ae"; const static std::string kvListName = "ae";
void addSampleKVItems(DomainRegistrantTransferCommand *command); void addSampleKVItems(DomainRegistrantTransferCommand *command);
@ -66,7 +66,7 @@ void addSampleKVItems(DomainRegistrantTransferCommand *command)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testWithoutPeriod); TEST_run(testWithoutPeriod);
// TEST_run(testWithPeriod); // TEST_run(testWithPeriod);
return TEST_errorCount(); return TEST_errorCount();

View File

@ -9,7 +9,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><rtrnData xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><name>example.com</name><exDate>2009-04-03T22:00:00.0Z</exDate></rtrnData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><rtrnData xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><name>example.com</name><exDate>2009-04-03T22:00:00.0Z</exDate></rtrnData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>";

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -113,7 +113,7 @@ void testSyncExpiryDateExtensionWithNullDate(void)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testSimpleUpdate); TEST_run(testSimpleUpdate);
TEST_run(testFullUpdate); TEST_run(testFullUpdate);
TEST_run(testSyncExpiryDateExtension); TEST_run(testSyncExpiryDateExtension);

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:infData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:name>3.8.0.0.6.9.2.3.6.1.4.4.e164.arpa</domain:name><domain:roid>EXAMPLE1-REP</domain:roid><domain:status s=\"ok\"/><domain:registrant>jd1234</domain:registrant><domain:contact type=\"admin\">sh8013</domain:contact><domain:contact type=\"tech\">sh8013</domain:contact><domain:ns><domain:hostObj>ns1.example.com</domain:hostObj><domain:hostObj>ns2.example.com</domain:hostObj></domain:ns><domain:host>ns1.example.com</domain:host><domain:host>ns2.example.com</domain:host><domain:clID>ClientX</domain:clID><domain:crID>ClientY</domain:crID><domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate><domain:upID>ClientX</domain:upID><domain:upDate>1999-12-03T09:00:00.0Z</domain:upDate><domain:exDate>2005-04-03T22:00:00.0Z</domain:exDate><domain:trDate>2000-04-08T09:00:00.0Z</domain:trDate><domain:authInfo><domain:pw>2fooBAR</domain:pw></domain:authInfo></domain:infData></resData><extension><e164:infData xmlns:e164=\"urn:ietf:params:xml:ns:e164epp-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:e164epp-1.0 e164epp-1.0.xsd\"><e164:naptr><e164:order>10</e164:order><e164:pref>100</e164:pref><e164:flags>u</e164:flags><e164:svc>E2U+sip</e164:svc><e164:regex>\"!^.*$!sip:info@example.com!\"</e164:regex></e164:naptr><e164:naptr><e164:order>10</e164:order><e164:pref>102</e164:pref><e164:flags>u</e164:flags><e164:svc>E2U+msg</e164:svc><e164:regex>\"!^.*$!mailto:info@example.com!\"</e164:regex></e164:naptr></e164:infData></extension><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:infData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:name>3.8.0.0.6.9.2.3.6.1.4.4.e164.arpa</domain:name><domain:roid>EXAMPLE1-REP</domain:roid><domain:status s=\"ok\"/><domain:registrant>jd1234</domain:registrant><domain:contact type=\"admin\">sh8013</domain:contact><domain:contact type=\"tech\">sh8013</domain:contact><domain:ns><domain:hostObj>ns1.example.com</domain:hostObj><domain:hostObj>ns2.example.com</domain:hostObj></domain:ns><domain:host>ns1.example.com</domain:host><domain:host>ns2.example.com</domain:host><domain:clID>ClientX</domain:clID><domain:crID>ClientY</domain:crID><domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate><domain:upID>ClientX</domain:upID><domain:upDate>1999-12-03T09:00:00.0Z</domain:upDate><domain:exDate>2005-04-03T22:00:00.0Z</domain:exDate><domain:trDate>2000-04-08T09:00:00.0Z</domain:trDate><domain:authInfo><domain:pw>2fooBAR</domain:pw></domain:authInfo></domain:infData></resData><extension><e164:infData xmlns:e164=\"urn:ietf:params:xml:ns:e164epp-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:e164epp-1.0 e164epp-1.0.xsd\"><e164:naptr><e164:order>10</e164:order><e164:pref>100</e164:pref><e164:flags>u</e164:flags><e164:svc>E2U+sip</e164:svc><e164:regex>\"!^.*$!sip:info@example.com!\"</e164:regex></e164:naptr><e164:naptr><e164:order>10</e164:order><e164:pref>102</e164:pref><e164:flags>u</e164:flags><e164:svc>E2U+msg</e164:svc><e164:regex>\"!^.*$!mailto:info@example.com!\"</e164:regex></e164:naptr></e164:infData></extension><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>";

View File

@ -9,7 +9,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Hello cmd; Hello cmd;

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -8,7 +8,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -12,7 +12,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml( const string xml(
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><host:infData xmlns:host=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><host:name>ns1.example.com</host:name><host:roid>NS1_EXAMPLE1-REP</host:roid><host:status s=\"linked\"/><host:status s=\"clientUpdateProhibited\"/><host:addr ip=\"v4\">192.0.2.2</host:addr><host:addr ip=\"v4\">192.0.2.29</host:addr><host:addr ip=\"v6\">1080:0:0:0:8:800:200C:417A</host:addr><host:clID>ClientY</host:clID><host:crID>ClientX</host:crID><host:crDate>1999-04-03T22:00:00.0Z</host:crDate><host:upID>ClientX</host:upID><host:upDate>1999-12-03T09:00:00.0Z</host:upDate><host:trDate>2000-04-08T09:00:00.0Z</host:trDate></host:infData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"); "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><host:infData xmlns:host=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><host:name>ns1.example.com</host:name><host:roid>NS1_EXAMPLE1-REP</host:roid><host:status s=\"linked\"/><host:status s=\"clientUpdateProhibited\"/><host:addr ip=\"v4\">192.0.2.2</host:addr><host:addr ip=\"v4\">192.0.2.29</host:addr><host:addr ip=\"v6\">1080:0:0:0:8:800:200C:417A</host:addr><host:clID>ClientY</host:clID><host:crID>ClientX</host:crID><host:crDate>1999-04-03T22:00:00.0Z</host:crDate><host:upID>ClientX</host:upID><host:upDate>1999-12-03T09:00:00.0Z</host:upDate><host:trDate>2000-04-08T09:00:00.0Z</host:trDate></host:infData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
ASSERT_EQ(IPVersion::IPv4()->toString(), "v4"); ASSERT_EQ(IPVersion::IPv4()->toString(), "v4");
ASSERT_EQ(IPVersion::IPv6()->toString(), "v6"); ASSERT_EQ(IPVersion::IPv6()->toString(), "v6");

View File

@ -19,7 +19,7 @@ void doWork()
const vector<string> extURIs(1, "urn:au:params:xml:ns:auext-1.0"); const vector<string> extURIs(1, "urn:au:params:xml:ns:auext-1.0");
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -8,7 +8,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -16,7 +16,7 @@ PollResponse& getPollResponse(const string xml);
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
testContactTransferApprovePoll(); testContactTransferApprovePoll();
testDomainTransferApprovePoll(); testDomainTransferApprovePoll();

View File

@ -1,6 +1,7 @@
#ifndef REGISTRANT_TRANSFER_COMMAND_TYPE #ifndef REGISTRANT_TRANSFER_COMMAND_TYPE
#define REGISTRANT_TRANSFER_COMMAND_TYPE #define REGISTRANT_TRANSFER_COMMAND_TYPE
#include <iostream>
#include "se/CommandType.hpp" #include "se/CommandType.hpp"
#include <string> #include <string>

View File

@ -1,7 +1,7 @@
#include "se/XMLGregorianCalendar.hpp" #include "se/XMLGregorianCalendar.hpp"
#include "common/StringUtils.hpp" #include "common/StringUtils.hpp"
#include "common/EPPException.hpp" #include "common/EPPException.hpp"
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <ctype.h> // isdigit() #include <ctype.h> // isdigit()

View File

@ -147,7 +147,7 @@ void testSecDNSJustKeyData()
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testSecDNSAllFields); TEST_run(testSecDNSAllFields);
TEST_run(testSecDNSMultipleDSDataWithoutMaxSigLife); TEST_run(testSecDNSMultipleDSDataWithoutMaxSigLife);
TEST_run(testSecDNSAllFieldsMin); TEST_run(testSecDNSAllFieldsMin);

View File

@ -239,7 +239,7 @@ void buildXmlResponseBeforeExtension(const string& domainName,
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testSecDNSInfoExtensionAllFields); TEST_run(testSecDNSInfoExtensionAllFields);
TEST_run(testSecDNSInfoExtensionOnlyKeyData); TEST_run(testSecDNSInfoExtensionOnlyKeyData);
TEST_run(testSecDNSInfoExtensionMultipleDsRecords); TEST_run(testSecDNSInfoExtensionMultipleDsRecords);

View File

@ -191,7 +191,7 @@ void testSecDNSRemoveAllAndAddKeyDataAndChangeMaxSigLife()
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testSecDNSAddFieldsUrgent); TEST_run(testSecDNSAddFieldsUrgent);
TEST_run(testSecDNSRemoveFieldsNotUrgent); TEST_run(testSecDNSRemoveFieldsNotUrgent);
TEST_run(testSecDNSRemoveAll); TEST_run(testSecDNSRemoveAll);

View File

@ -88,7 +88,7 @@ void testPollCount()
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testLoginCount); TEST_run(testLoginCount);
TEST_run(testMixedCommandsCount); TEST_run(testMixedCommandsCount);

View File

@ -26,9 +26,9 @@ static TestEnvironment props;
void doWork() void doWork()
{ {
if (!tkScenario) if (!tkScenario)
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
else else
scenario(tkScenario); scenario(tkScenario,"./etc/toolkit2.conf");
string op("shutdown"); string op("shutdown");
{ {

View File

@ -20,9 +20,9 @@ extern int tkScenario;
void doWork() void doWork()
{ {
if (!tkScenario) if (!tkScenario)
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
else else
scenario(tkScenario); scenario(tkScenario,"./etc/toolkit2.conf");
{ {
TestEnvironment props; TestEnvironment props;
auto_ptr<Session> sess(SessionFactory::newInstance(&props)); auto_ptr<Session> sess(SessionFactory::newInstance(&props));

View File

@ -9,7 +9,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string registrantName = "AusRegistry"; const string registrantName = "AusRegistry";
const string registrantID = "01241326211"; const string registrantID = "01241326211";

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -11,7 +11,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -11,15 +11,15 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
ArDomainUnrenewCommand cmd( ArDomainUnrenewCommand cmd(
"jtkutest.com.au", *EPPDateFormatter::fromXSDateTime("2007-01-01T00:00:00.0Z")); "jtkutest.com.au", *EPPDateFormatter::fromXSDateTime("2014-01-01T00:00:00.0Z"));
const string xml(cmd.toXML()); 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>2007-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.20070101.010101.0</clTRID></command></extension></epp>");
} }
int main(int argc, char* argv[]) int main(int argc, char* argv[])

View File

@ -9,7 +9,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml1 = const string xml1 =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><urenData xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\"><name>example.com</name><exDate>2009-04-03T22:00:00.0Z</exDate></urenData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><urenData xmlns=\"urn:X-ar:params:xml:ns:ardomain-1.0\"><name>example.com</name><exDate>2009-04-03T22:00:00.0Z</exDate></urenData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>";
const string xml2 = const string xml2 =

View File

@ -9,7 +9,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string registrantName = "AusRegistry"; const string registrantName = "AusRegistry";
const string registrantID = "01241326211"; const string registrantID = "01241326211";

View File

@ -8,7 +8,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone='no'?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:infData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:name>example.com.au</domain:name><domain:roid>D0000003-AR</domain:roid><domain:status s=\"ok\" lang=\"en\"/><domain:registrant>EXAMPLE</domain:registrant><domain:contact type=\"tech\">EXAMPLE</domain:contact><domain:ns><domain:hostObj>ns1.example.com.au</domain:hostObj><domain:hostObj>ns2.example.com.au</domain:hostObj></domain:ns><domain:host>ns1.example.com.au</domain:host><domain:host>ns2.exmaple.com.au</domain:host><domain:clID>Registrar</domain:clID><domain:crID>Registrar</domain:crID><domain:crDate>2006-02-09T15:44:58.0Z</domain:crDate><domain:exDate>2008-02-10T00:00:00.0Z</domain:exDate><domain:authInfo><domain:pw>0192pqow</domain:pw></domain:authInfo></domain:infData></resData><extension><auext:infData xmlns:auext=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><auext:auProperties><auext:registrantName>RegistrantName Pty. Ltd.</auext:registrantName><auext:registrantID type=\"ACN\">123456789</auext:registrantID><auext:eligibilityType>Other</auext:eligibilityType><auext:eligibilityName>Registrant Eligi</auext:eligibilityName><auext:eligibilityID type=\"ABN\">987654321</auext:eligibilityID><auext:policyReason>2</auext:policyReason></auext:auProperties></auext:infData></extension><trID><clTRID>ABC-12345</clTRID><svTRID>805</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone='no'?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:infData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:name>example.com.au</domain:name><domain:roid>D0000003-AR</domain:roid><domain:status s=\"ok\" lang=\"en\"/><domain:registrant>EXAMPLE</domain:registrant><domain:contact type=\"tech\">EXAMPLE</domain:contact><domain:ns><domain:hostObj>ns1.example.com.au</domain:hostObj><domain:hostObj>ns2.example.com.au</domain:hostObj></domain:ns><domain:host>ns1.example.com.au</domain:host><domain:host>ns2.exmaple.com.au</domain:host><domain:clID>Registrar</domain:clID><domain:crID>Registrar</domain:crID><domain:crDate>2006-02-09T15:44:58.0Z</domain:crDate><domain:exDate>2008-02-10T00:00:00.0Z</domain:exDate><domain:authInfo><domain:pw>0192pqow</domain:pw></domain:authInfo></domain:infData></resData><extension><auext:infData xmlns:auext=\"urn:X-au:params:xml:ns:auext-1.1\" xsi:schemaLocation=\"urn:X-au:params:xml:ns:auext-1.1 auext-1.1.xsd\"><auext:auProperties><auext:registrantName>RegistrantName Pty. Ltd.</auext:registrantName><auext:registrantID type=\"ACN\">123456789</auext:registrantID><auext:eligibilityType>Other</auext:eligibilityType><auext:eligibilityName>Registrant Eligi</auext:eligibilityName><auext:eligibilityID type=\"ABN\">987654321</auext:eligibilityID><auext:policyReason>2</auext:policyReason></auext:auProperties></auext:infData></extension><trID><clTRID>ABC-12345</clTRID><svTRID>805</svTRID></trID></response></epp>";
AuDomainInfoResponse response; AuDomainInfoResponse response;

View File

@ -13,7 +13,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone='no'?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:infData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:name>example.com.au</domain:name><domain:roid>D0000003-AR</domain:roid><domain:status s=\"ok\" lang=\"en\"/><domain:registrant>EXAMPLE</domain:registrant><domain:contact type=\"tech\">EXAMPLE</domain:contact><domain:ns><domain:hostObj>ns1.example.com.au</domain:hostObj><domain:hostObj>ns2.example.com.au</domain:hostObj></domain:ns><domain:host>ns1.example.com.au</domain:host><domain:host>ns2.exmaple.com.au</domain:host><domain:clID>Registrar</domain:clID><domain:crID>Registrar</domain:crID><domain:crDate>2006-02-09T15:44:58.0Z</domain:crDate><domain:exDate>2008-02-10T00:00:00.0Z</domain:exDate><domain:authInfo><domain:pw>0192pqow</domain:pw></domain:authInfo></domain:infData></resData><extension><auext:extensionAU xmlns:auext=\"urn:au:params:xml:ns:auext-1.0\" xsi:schemaLocation=\"urn:au:params:xml:ns:auext-1.0 auext-1.0.xsd\"><auext:info><auext:registrantName>RegistrantName Pty. Ltd.</auext:registrantName><auext:registrantID type=\"ACN\">123456789</auext:registrantID><auext:eligibilityType>Other</auext:eligibilityType><auext:eligibilityName>Registrant Eligi</auext:eligibilityName><auext:eligibilityID type=\"ABN\">987654321</auext:eligibilityID><auext:policyReason>2</auext:policyReason></auext:info></auext:extensionAU></extension><trID><clTRID>ABC-12345</clTRID><svTRID>805</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone='no'?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:infData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:name>example.com.au</domain:name><domain:roid>D0000003-AR</domain:roid><domain:status s=\"ok\" lang=\"en\"/><domain:registrant>EXAMPLE</domain:registrant><domain:contact type=\"tech\">EXAMPLE</domain:contact><domain:ns><domain:hostObj>ns1.example.com.au</domain:hostObj><domain:hostObj>ns2.example.com.au</domain:hostObj></domain:ns><domain:host>ns1.example.com.au</domain:host><domain:host>ns2.exmaple.com.au</domain:host><domain:clID>Registrar</domain:clID><domain:crID>Registrar</domain:crID><domain:crDate>2006-02-09T15:44:58.0Z</domain:crDate><domain:exDate>2008-02-10T00:00:00.0Z</domain:exDate><domain:authInfo><domain:pw>0192pqow</domain:pw></domain:authInfo></domain:infData></resData><extension><auext:extensionAU xmlns:auext=\"urn:au:params:xml:ns:auext-1.0\" xsi:schemaLocation=\"urn:au:params:xml:ns:auext-1.0 auext-1.0.xsd\"><auext:info><auext:registrantName>RegistrantName Pty. Ltd.</auext:registrantName><auext:registrantID type=\"ACN\">123456789</auext:registrantID><auext:eligibilityType>Other</auext:eligibilityType><auext:eligibilityName>Registrant Eligi</auext:eligibilityName><auext:eligibilityID type=\"ABN\">987654321</auext:eligibilityID><auext:policyReason>2</auext:policyReason></auext:info></auext:extensionAU></extension><trID><clTRID>ABC-12345</clTRID><svTRID>805</svTRID></trID></response></epp>";

View File

@ -9,7 +9,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string registrantName = "AusRegistry"; const string registrantName = "AusRegistry";
const string registrantID = "01241326211"; const string registrantID = "01241326211";

View File

@ -12,7 +12,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const int policyReason = 1; const int policyReason = 1;
const string registrantName = "AusRegistry"; const string registrantName = "AusRegistry";
@ -22,7 +22,7 @@ void doWork()
const string eligibilityName = "Blah"; const string eligibilityName = "Blah";
const string eligibilityID = "1231239523"; const string eligibilityID = "1231239523";
const string eligibilityIDType = "OTHER"; const string eligibilityIDType = "OTHER";
auto_ptr<XMLGregorianCalendar> curExpDate(EPPDateFormatter::fromXSDateTime("2007-01-01T01:01:01.0Z")); auto_ptr<XMLGregorianCalendar> curExpDate(EPPDateFormatter::fromXSDateTime("2014-01-01T01:01:01.0Z"));
{ {
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
@ -36,7 +36,7 @@ void doWork()
registrantName, registrantName,
"testing"); "testing");
const string xml(cmd.toXML()); 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>2007-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.20070101.010101.0</clTRID></command></extension></epp>");
} }
{ {
@ -58,7 +58,7 @@ void doWork()
&eligibilityIDType, &eligibilityIDType,
&p); &p);
const string xml(cmd.toXML()); 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>2007-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.20070101.010101.0</clTRID></command></extension></epp>");
} }
} }

View File

@ -9,7 +9,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><rtrnData xmlns=\"urn:X-au:params:xml:ns:audomain-1.0\"><name>example.com</name><exDate>2009-04-03T22:00:00.0Z</exDate></rtrnData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><rtrnData xmlns=\"urn:X-au:params:xml:ns:audomain-1.0\"><name>example.com</name><exDate>2009-04-03T22:00:00.0Z</exDate></rtrnData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>";

View File

@ -8,7 +8,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -8,7 +8,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><contact:chkData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><contact:cd><contact:id avail=\"1\">sh8013</contact:id></contact:cd><contact:cd><contact:id avail=\"0\">sah8013</contact:id><contact:reason>In use</contact:reason></contact:cd><contact:cd><contact:id avail=\"1\">8013sah</contact:id></contact:cd></contact:chkData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"; const string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><contact:chkData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><contact:cd><contact:id avail=\"1\">sh8013</contact:id></contact:cd><contact:cd><contact:id avail=\"0\">sah8013</contact:id><contact:reason>In use</contact:reason></contact:cd><contact:cd><contact:id avail=\"1\">8013sah</contact:id></contact:cd></contact:chkData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>";

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -13,7 +13,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml( const string xml(
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><contact:infData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><contact:id>sh8013</contact:id><contact:roid>SH8013-REP</contact:roid><contact:status s=\"linked\"/><contact:status s=\"clientDeleteProhibited\"/><contact:postalInfo type=\"int\"><contact:name>John Doe</contact:name><contact:org>Example Inc.</contact:org><contact:addr><contact:street>123 Example Dr.</contact:street><contact:street>Suite 100</contact:street><contact:city>Dulles</contact:city><contact:sp>VA</contact:sp><contact:pc>20166-6503</contact:pc><contact:cc>US</contact:cc></contact:addr></contact:postalInfo><contact:voice x=\"1234\">+1.7035555555</contact:voice><contact:fax>+1.7035555556</contact:fax><contact:email>jdoe@example.com</contact:email><contact:clID>ClientY</contact:clID><contact:crID>ClientX</contact:crID><contact:crDate>1999-04-03T22:00:00.0Z</contact:crDate><contact:upID>ClientX</contact:upID><contact:upDate>1999-12-03T09:00:00.0Z</contact:upDate><contact:trDate>2000-04-08T09:00:00.0Z</contact:trDate><contact:authInfo><contact:pw>2fooBAR</contact:pw></contact:authInfo></contact:infData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"); "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><contact:infData xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd\"><contact:id>sh8013</contact:id><contact:roid>SH8013-REP</contact:roid><contact:status s=\"linked\"/><contact:status s=\"clientDeleteProhibited\"/><contact:postalInfo type=\"int\"><contact:name>John Doe</contact:name><contact:org>Example Inc.</contact:org><contact:addr><contact:street>123 Example Dr.</contact:street><contact:street>Suite 100</contact:street><contact:city>Dulles</contact:city><contact:sp>VA</contact:sp><contact:pc>20166-6503</contact:pc><contact:cc>US</contact:cc></contact:addr></contact:postalInfo><contact:voice x=\"1234\">+1.7035555555</contact:voice><contact:fax>+1.7035555556</contact:fax><contact:email>jdoe@example.com</contact:email><contact:clID>ClientY</contact:clID><contact:crID>ClientX</contact:crID><contact:crDate>1999-04-03T22:00:00.0Z</contact:crDate><contact:upID>ClientX</contact:upID><contact:upDate>1999-12-03T09:00:00.0Z</contact:upDate><contact:trDate>2000-04-08T09:00:00.0Z</contact:trDate><contact:authInfo><contact:pw>2fooBAR</contact:pw></contact:authInfo></contact:infData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>");

View File

@ -12,7 +12,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -12,7 +12,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:chkData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:cd><domain:name avail=\"1\">example.com</domain:name></domain:cd><domain:cd><domain:name avail=\"0\">example.net</domain:name><domain:reason>In use</domain:reason></domain:cd><domain:cd><domain:name avail=\"1\">example.org</domain:name></domain:cd></domain:chkData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:chkData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:cd><domain:name avail=\"1\">example.com</domain:name></domain:cd><domain:cd><domain:name avail=\"0\">example.net</domain:name><domain:reason>In use</domain:reason></domain:cd><domain:cd><domain:name avail=\"1\">example.org</domain:name></domain:cd></domain:chkData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>";

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -113,7 +113,7 @@ void checkKeyValueList(const DomainInfoKVResponseExtension &kvExtension, const s
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testNonExistentListName); TEST_run(testNonExistentListName);
TEST_run(testNonExistentItem); TEST_run(testNonExistentItem);
TEST_run(testNotInitialisedWhenNoKVExtensionPresent); TEST_run(testNotInitialisedWhenNoKVExtensionPresent);

View File

@ -82,7 +82,7 @@ void addSampleItemsToExtension(DomainKVCommandExtension &extension, const string
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testUpdateSingleKVList); TEST_run(testUpdateSingleKVList);
TEST_run(testCreateSingleKVList); TEST_run(testCreateSingleKVList);
TEST_run(testMultipleKVList); TEST_run(testMultipleKVList);

View File

@ -16,7 +16,7 @@ const static std::string policyReason = "1";
const static std::string eligibilityName = "Blah"; const static std::string eligibilityName = "Blah";
const static std::string eligibilityIDValue = "1231239523"; const static std::string eligibilityIDValue = "1231239523";
const static std::string eligibilityIDType = "Trademark"; const static std::string eligibilityIDType = "Trademark";
const auto_ptr<XMLGregorianCalendar> curExpDate(EPPDateFormatter::fromXSDateTime("2007-01-01T01:01:01.0Z")); const auto_ptr<XMLGregorianCalendar> curExpDate(EPPDateFormatter::fromXSDateTime("2014-01-01T01:01:01.0Z"));
const static std::string kvListName = "ae"; const static std::string kvListName = "ae";
void addSampleKVItems(DomainRegistrantTransferCommand *command); void addSampleKVItems(DomainRegistrantTransferCommand *command);
@ -66,7 +66,7 @@ void addSampleKVItems(DomainRegistrantTransferCommand *command)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testWithoutPeriod); TEST_run(testWithoutPeriod);
// TEST_run(testWithPeriod); // TEST_run(testWithPeriod);
return TEST_errorCount(); return TEST_errorCount();

View File

@ -9,7 +9,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><rtrnData xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><name>example.com</name><exDate>2009-04-03T22:00:00.0Z</exDate></rtrnData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><rtrnData xmlns=\"urn:X-ar:params:xml:ns:registrant-1.0\"><name>example.com</name><exDate>2009-04-03T22:00:00.0Z</exDate></rtrnData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54321-XYZ</svTRID></trID></response></epp>";

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -113,7 +113,7 @@ void testSyncExpiryDateExtensionWithNullDate(void)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testSimpleUpdate); TEST_run(testSimpleUpdate);
TEST_run(testFullUpdate); TEST_run(testFullUpdate);
TEST_run(testSyncExpiryDateExtension); TEST_run(testSyncExpiryDateExtension);

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml = const string xml =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:infData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:name>3.8.0.0.6.9.2.3.6.1.4.4.e164.arpa</domain:name><domain:roid>EXAMPLE1-REP</domain:roid><domain:status s=\"ok\"/><domain:registrant>jd1234</domain:registrant><domain:contact type=\"admin\">sh8013</domain:contact><domain:contact type=\"tech\">sh8013</domain:contact><domain:ns><domain:hostObj>ns1.example.com</domain:hostObj><domain:hostObj>ns2.example.com</domain:hostObj></domain:ns><domain:host>ns1.example.com</domain:host><domain:host>ns2.example.com</domain:host><domain:clID>ClientX</domain:clID><domain:crID>ClientY</domain:crID><domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate><domain:upID>ClientX</domain:upID><domain:upDate>1999-12-03T09:00:00.0Z</domain:upDate><domain:exDate>2005-04-03T22:00:00.0Z</domain:exDate><domain:trDate>2000-04-08T09:00:00.0Z</domain:trDate><domain:authInfo><domain:pw>2fooBAR</domain:pw></domain:authInfo></domain:infData></resData><extension><e164:infData xmlns:e164=\"urn:ietf:params:xml:ns:e164epp-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:e164epp-1.0 e164epp-1.0.xsd\"><e164:naptr><e164:order>10</e164:order><e164:pref>100</e164:pref><e164:flags>u</e164:flags><e164:svc>E2U+sip</e164:svc><e164:regex>\"!^.*$!sip:info@example.com!\"</e164:regex></e164:naptr><e164:naptr><e164:order>10</e164:order><e164:pref>102</e164:pref><e164:flags>u</e164:flags><e164:svc>E2U+msg</e164:svc><e164:regex>\"!^.*$!mailto:info@example.com!\"</e164:regex></e164:naptr></e164:infData></extension><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"; "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><domain:infData xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd\"><domain:name>3.8.0.0.6.9.2.3.6.1.4.4.e164.arpa</domain:name><domain:roid>EXAMPLE1-REP</domain:roid><domain:status s=\"ok\"/><domain:registrant>jd1234</domain:registrant><domain:contact type=\"admin\">sh8013</domain:contact><domain:contact type=\"tech\">sh8013</domain:contact><domain:ns><domain:hostObj>ns1.example.com</domain:hostObj><domain:hostObj>ns2.example.com</domain:hostObj></domain:ns><domain:host>ns1.example.com</domain:host><domain:host>ns2.example.com</domain:host><domain:clID>ClientX</domain:clID><domain:crID>ClientY</domain:crID><domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate><domain:upID>ClientX</domain:upID><domain:upDate>1999-12-03T09:00:00.0Z</domain:upDate><domain:exDate>2005-04-03T22:00:00.0Z</domain:exDate><domain:trDate>2000-04-08T09:00:00.0Z</domain:trDate><domain:authInfo><domain:pw>2fooBAR</domain:pw></domain:authInfo></domain:infData></resData><extension><e164:infData xmlns:e164=\"urn:ietf:params:xml:ns:e164epp-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:e164epp-1.0 e164epp-1.0.xsd\"><e164:naptr><e164:order>10</e164:order><e164:pref>100</e164:pref><e164:flags>u</e164:flags><e164:svc>E2U+sip</e164:svc><e164:regex>\"!^.*$!sip:info@example.com!\"</e164:regex></e164:naptr><e164:naptr><e164:order>10</e164:order><e164:pref>102</e164:pref><e164:flags>u</e164:flags><e164:svc>E2U+msg</e164:svc><e164:regex>\"!^.*$!mailto:info@example.com!\"</e164:regex></e164:naptr></e164:infData></extension><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>";

View File

@ -9,7 +9,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Hello cmd; Hello cmd;

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -8,7 +8,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -12,7 +12,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
const string xml( const string xml(
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><host:infData xmlns:host=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><host:name>ns1.example.com</host:name><host:roid>NS1_EXAMPLE1-REP</host:roid><host:status s=\"linked\"/><host:status s=\"clientUpdateProhibited\"/><host:addr ip=\"v4\">192.0.2.2</host:addr><host:addr ip=\"v4\">192.0.2.29</host:addr><host:addr ip=\"v6\">1080:0:0:0:8:800:200C:417A</host:addr><host:clID>ClientY</host:clID><host:crID>ClientX</host:crID><host:crDate>1999-04-03T22:00:00.0Z</host:crDate><host:upID>ClientX</host:upID><host:upDate>1999-12-03T09:00:00.0Z</host:upDate><host:trDate>2000-04-08T09:00:00.0Z</host:trDate></host:infData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>"); "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><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\"><response><result code=\"1000\"><msg>Command completed successfully</msg></result><resData><host:infData xmlns:host=\"urn:ietf:params:xml:ns:host-1.0\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd\"><host:name>ns1.example.com</host:name><host:roid>NS1_EXAMPLE1-REP</host:roid><host:status s=\"linked\"/><host:status s=\"clientUpdateProhibited\"/><host:addr ip=\"v4\">192.0.2.2</host:addr><host:addr ip=\"v4\">192.0.2.29</host:addr><host:addr ip=\"v6\">1080:0:0:0:8:800:200C:417A</host:addr><host:clID>ClientY</host:clID><host:crID>ClientX</host:crID><host:crDate>1999-04-03T22:00:00.0Z</host:crDate><host:upID>ClientX</host:upID><host:upDate>1999-12-03T09:00:00.0Z</host:upDate><host:trDate>2000-04-08T09:00:00.0Z</host:trDate></host:infData></resData><trID><clTRID>ABC-12345</clTRID><svTRID>54322-XYZ</svTRID></trID></response></epp>");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
ASSERT_EQ(IPVersion::IPv4()->toString(), "v4"); ASSERT_EQ(IPVersion::IPv4()->toString(), "v4");
ASSERT_EQ(IPVersion::IPv6()->toString(), "v6"); ASSERT_EQ(IPVersion::IPv6()->toString(), "v6");

View File

@ -19,7 +19,7 @@ void doWork()
const vector<string> extURIs(1, "urn:au:params:xml:ns:auext-1.0"); const vector<string> extURIs(1, "urn:au:params:xml:ns:auext-1.0");
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -10,7 +10,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
{ {
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");

View File

@ -8,7 +8,7 @@ using namespace std;
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
CLTRID::setClID("JTKUTEST"); CLTRID::setClID("JTKUTEST");

View File

@ -16,7 +16,7 @@ PollResponse& getPollResponse(const string xml);
void doWork() void doWork()
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
testContactTransferApprovePoll(); testContactTransferApprovePoll();
testDomainTransferApprovePoll(); testDomainTransferApprovePoll();

View File

@ -147,7 +147,7 @@ void testSecDNSJustKeyData()
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testSecDNSAllFields); TEST_run(testSecDNSAllFields);
TEST_run(testSecDNSMultipleDSDataWithoutMaxSigLife); TEST_run(testSecDNSMultipleDSDataWithoutMaxSigLife);
TEST_run(testSecDNSAllFieldsMin); TEST_run(testSecDNSAllFieldsMin);

View File

@ -239,7 +239,7 @@ void buildXmlResponseBeforeExtension(const string& domainName,
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testSecDNSInfoExtensionAllFields); TEST_run(testSecDNSInfoExtensionAllFields);
TEST_run(testSecDNSInfoExtensionOnlyKeyData); TEST_run(testSecDNSInfoExtensionOnlyKeyData);
TEST_run(testSecDNSInfoExtensionMultipleDsRecords); TEST_run(testSecDNSInfoExtensionMultipleDsRecords);

View File

@ -191,7 +191,7 @@ void testSecDNSRemoveAllAndAddKeyDataAndChangeMaxSigLife()
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
init("/home/drde/etc/toolkit2.conf"); init("./etc/toolkit2.conf");
TEST_run(testSecDNSAddFieldsUrgent); TEST_run(testSecDNSAddFieldsUrgent);
TEST_run(testSecDNSRemoveFieldsNotUrgent); TEST_run(testSecDNSRemoveFieldsNotUrgent);
TEST_run(testSecDNSRemoveAll); TEST_run(testSecDNSRemoveAll);

Some files were not shown because too many files have changed in this diff Show More