mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Apache SSL configuration, basic tests for Registry app via mod_epp
This commit is contained in:
parent
3d84d37219
commit
7d4142abc2
10 changed files with 172 additions and 64 deletions
23
spec/epp/requests/login.xml
Normal file
23
spec/epp/requests/login.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?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">
|
||||
<command>
|
||||
<login>
|
||||
<clID>test</clID>
|
||||
<pw>test</pw>
|
||||
<options>
|
||||
<version>1.0</version>
|
||||
<lang>en</lang>
|
||||
</options>
|
||||
<svcs>
|
||||
<objURI>http://www.nic.cz/xml/epp/contact-1.6</objURI>
|
||||
<objURI>http://www.nic.cz/xml/epp/nsset-1.2</objURI>
|
||||
<objURI>http://www.nic.cz/xml/epp/domain-1.4</objURI>
|
||||
<objURI>http://www.nic.cz/xml/epp/keyset-1.3</objURI>
|
||||
<svcExtension>
|
||||
<extURI>http://www.nic.cz/xml/epp/enumval-1.2</extURI>
|
||||
</svcExtension>
|
||||
</svcs>
|
||||
</login>
|
||||
<clTRID>wgyn001#10-02-08at13:58:06</clTRID>
|
||||
</command>
|
||||
</epp>
|
|
@ -1,5 +1,28 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe "EPP Session" do
|
||||
it "greets client upon connection"
|
||||
describe 'EPP Session', type: :epp do
|
||||
let(:server) { server = Epp::Server.new({server: 'localhost', tag: 'test', password: 'test'}) }
|
||||
|
||||
context 'when not connected' do
|
||||
it 'greets client upon connection' do
|
||||
response = Nokogiri::XML(server.open_connection)
|
||||
expect(response.css('epp svID').text).to eq('EPP server (DSDng)')
|
||||
server.close_connection
|
||||
end
|
||||
end
|
||||
|
||||
context 'when connected' do
|
||||
before(:each) { server.open_connection }
|
||||
after(:each) { server.close_connection }
|
||||
|
||||
it 'logs in epp user' do
|
||||
response = Nokogiri::XML(server.send_request(read_body('login.xml')))
|
||||
|
||||
result = response.css('epp response result').first
|
||||
expect(result[:code]).to eq('1000')
|
||||
|
||||
msg = response.css('epp response result msg').text
|
||||
expect(msg).to eq('User test was authenticated. Welcome.')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue