Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update tests

  • Loading branch information...
commit 0861dcb8a418abb37b286528be9eaf8b0b1a068a 1 parent d95f027
@arhuman authored
View
15 t/115-Person.t
@@ -56,6 +56,12 @@ is_deeply( $object->e_mail(), ['xxx@somewhere.com'], 'e_mail properly parsed' );
$object->e_mail('Added e_mail');
is( $object->e_mail()->[1], 'Added e_mail', 'e_mail properly added' );
+# Test 'org'
+$tested{'org'}++;
+is_deeply( $object->org(), ['ORG-MISC01-RIPE', 'ORG-MISC02-RIPE'], 'org properly parsed' );
+$object->org('ORG-MISC03-RIPE');
+is( $object->org()->[2], 'ORG-MISC03-RIPE', 'org properly added' );
+
# Test 'nic_hdl'
$tested{'nic_hdl'}++;
is( $object->nic_hdl(), 'NC123-RIPE', 'nic_hdl properly parsed' );
@@ -74,6 +80,12 @@ is_deeply( $object->notify(), ['MAIN-FR-MNT'], 'notify properly parsed' );
$object->notify('Added notify');
is( $object->notify()->[1], 'Added notify', 'notify properly added' );
+# Test 'abuse_mailbox'
+$tested{'abuse_mailbox'}++;
+is_deeply( $object->abuse_mailbox(), ['abuse@somewhere.com'], 'abuse_mailbox properly parsed' );
+$object->abuse_mailbox('abuse2@elsewhere.com');
+is( $object->abuse_mailbox()->[1], 'abuse2@elsewhere.com', 'abuse_mailbox properly added' );
+
# Test 'remarks'
$tested{'remarks'}++;
is_deeply( $object->remarks(), ['Simple person object'], 'remarks properly parsed' );
@@ -106,9 +118,12 @@ address: 75001 PARIS
phone: +33 1 72 44 01 00
fax-no: +33 1 72 44 01 46
e-mail: xxx@somewhere.com
+org: ORG-MISC01-RIPE
+org: ORG-MISC02-RIPE
nic-hdl: NC123-RIPE
mnt-by: MAIN-FR-MNT
notify: MAIN-FR-MNT
+abuse-mailbox: abuse@somewhere.com
changed: xxx@somewhere.com 20121016
source: RIPE # Filtered
View
14 t/120-Role.t
@@ -55,6 +55,18 @@ is_deeply( $object->fax_no(), ['+33 1 44 01 01 46'], 'fax_no properly parsed' );
$object->fax_no('Added fax_no');
is( $object->fax_no()->[1], 'Added fax_no', 'fax_no properly added' );
+# Test 'e_mail'
+$tested{'e_mail'}++;
+is_deeply( $object->e_mail(), ['role@somewhere.com'], 'e_mail properly parsed' );
+$object->e_mail('role2@elsewhere.com');
+is( $object->e_mail()->[1], 'role2@elsewhere.com', 'e_mail properly added' );
+
+# Test 'org'
+$tested{'org'}++;
+is_deeply( $object->org(), ['ORG-MISC01-RIPE'], 'org properly parsed' );
+$object->org('ORG-MISC02-RIPE');
+is( $object->org()->[1], 'ORG-MISC02-RIPE', 'org properly added' );
+
# Test 'admin_c'
$tested{'admin_c'}++;
is_deeply( $object->admin_c(), ['CPY01-RIPE'], 'admin_c properly parsed' );
@@ -126,6 +138,8 @@ address: 75001 Paris
address: France
phone: +33 1 44 01 01 00
fax-no: +33 1 44 01 01 46
+e-mail: role@somewhere.com
+org: ORG-MISC01-RIPE
admin-c: CPY01-RIPE
tech-c: CPY01-RIPE
tech-c: C???-RIPE
View
14 t/125-AsSet.t
@@ -44,6 +44,12 @@ is_deeply( $object->remarks(), [ '**********************', '* Remarks
$object->remarks('Added remarks');
is( $object->remarks()->[3], 'Added remarks', 'remarks properly added' );
+# Test 'org'
+$tested{'org'}++;
+is_deeply( $object->org(), ['ORG-MISC01-RIPE'], 'org properly parsed' );
+$object->org('ORG-MISC02-RIPE');
+is( $object->org()->[1], 'ORG-MISC02-RIPE', 'org properly added' );
+
# Test 'members'
$tested{'members'}++;
is_deeply( $object->members(), [ 'AS1', 'AS11', 'AS21', 'AS1211' ], 'members properly parsed' );
@@ -80,6 +86,12 @@ is_deeply( $object->mnt_by(), ['THE-MNT'], 'mnt_by properly parsed' );
$object->mnt_by('Added mnt_by');
is( $object->mnt_by()->[1], 'Added mnt_by', 'mnt_by properly added' );
+# Test 'mnt_lower'
+$tested{'mnt_lower'}++;
+is_deeply( $object->mnt_lower(), ['THE-LMNT'], 'mnt_lower properly parsed' );
+$object->mnt_lower('Added mnt_lower');
+is( $object->mnt_lower()->[1], 'Added mnt_lower', 'mnt_lower properly added' );
+
# Test 'changed'
$tested{'changed'}++;
is_deeply( $object->changed(), [ 'someone@somewhere.net 20080422', 'someoneelese@somewere.net 20090429' ], 'changed properly parsed' );
@@ -103,6 +115,7 @@ descr: A description
remarks: **********************
remarks: * Remarks *
remarks: **********************
+org: ORG-MISC01-RIPE
members: AS1
members: AS11
members: AS21
@@ -115,6 +128,7 @@ tech-c: CXXX-RIPE
tech-c: CXXXXX-RIPE
notify: watcher@somewhere.com
mnt-by: THE-MNT
+mnt-lower: THE-LMNT
changed: someone@somewhere.net 20080422
changed: someoneelese@somewere.net 20090429
source: RIPE # Filtered
View
15 t/135-InetNum.t
@@ -55,6 +55,18 @@ is_deeply( $object->country(), ['FR'], 'country properly parsed' );
$object->country('Added country');
is( $object->country()->[1], 'Added country', 'country properly added' );
+# Test 'geoloc'
+$tested{'geoloc'}++;
+is( $object->geoloc(), '[-90,90]', 'geoloc properly parsed' );
+$object->geoloc('[-90,91]');
+is( $object->geoloc(), '[-90,91]', 'geoloc properly set' );
+
+# Test 'language'
+$tested{'language'}++;
+is_deeply( $object->language(), ['FR','EN'], 'language properly parsed' );
+$object->language('ES');
+is( $object->language()->[2], 'ES', 'language properly added' );
+
# Test 'org'
$tested{'org'}++;
is( $object->org(), 'ORG-MISC01-RIPE', 'org properly parsed' );
@@ -138,7 +150,10 @@ remarks: No remarks
netname: EXAMPLENET-AP
descr: Example net Pty Ltd
country: FR
+language: FR
+language: EN
org: ORG-MISC01-RIPE
+geoloc: [-90,90]
admin-c: FR123-AP
tech-c: FR123-AP
status: ALLOCATED PA
View
15 t/140-Inet6Num.t
@@ -51,6 +51,18 @@ is_deeply( $object->country(), ['AP'], 'country properly parsed' );
$object->country('FR');
is( $object->country()->[1], 'FR', 'country properly added' );
+# Test 'geoloc'
+$tested{'geoloc'}++;
+is( $object->geoloc(), '[-90,90]', 'geoloc properly parsed' );
+$object->geoloc('[-90,91]');
+is( $object->geoloc(), '[-90,91]', 'geoloc properly set' );
+
+# Test 'language'
+$tested{'language'}++;
+is_deeply( $object->language(), ['FR','EN'], 'language properly parsed' );
+$object->language('ES');
+is( $object->language()->[2], 'ES', 'language properly added' );
+
# Test 'remarks'
$tested{'remarks'}++;
is_deeply( $object->remarks(), ['Example subnet'], 'remarks properly parsed' );
@@ -143,6 +155,9 @@ admin-c: FR123-AP
tech-c: FR123-AP
status: ALLOCATED PORTABLE
notify: abc@examplenet.com
+geoloc: [-90,90]
+language: FR
+language: EN
mnt-by: MAINT-EXAMPLENET-AP
mnt-lower: MAINT-EXAMPLENET-AP
mnt-routes: MAINT-EXAMPLENET-AP
View
7 t/150-RtrSet.t
@@ -92,6 +92,12 @@ is_deeply( $object->remarks(), ['No remarks'], 'remarks properly parsed' );
$object->remarks('Added remarks');
is( $object->remarks()->[1], 'Added remarks', 'remarks properly added' );
+# Test 'org'
+$tested{'org'}++;
+is_deeply( $object->org(), ['ORG-MISC01-RIPE'], 'org properly parsed' );
+$object->org('ORG-MISC02-RIPE');
+is( $object->org()->[1], 'ORG-MISC02-RIPE', 'org properly added' );
+
# Test 'source'
$tested{'source'}++;
is( $object->source(), 'RIPE', 'source properly parsed' );
@@ -120,5 +126,6 @@ mnt-by: MAINT-EXAMPLENET-AP
notify: watcher@example.com
changed: abc@examplenet.com 20101231
remarks: No remarks
+org: ORG-MISC01-RIPE
source: RIPE
View
7 t/160-KeyCert.t
@@ -64,6 +64,12 @@ is( $object->certif()->[28], '=opxg',
$object->certif('Added certif');
is( $object->certif()->[30], 'Added certif', 'certif properly added' );
+# Test 'org'
+$tested{'org'}++;
+is_deeply( $object->org(), ['ORG-MISC01-RIPE'], 'org properly parsed' );
+$object->org('ORG-MISC02-RIPE');
+is( $object->org()->[1], 'ORG-MISC02-RIPE', 'org properly added' );
+
# Test 'notify'
$tested{'notify'}++;
is_deeply( $object->notify(), ['watcher@somewhere.com'], 'notify properly parsed' );
@@ -146,6 +152,7 @@ certif: EwIbDAAKCRBoulTzThfGZ/VlAKCjxj+twQmuEyfNc8GzXTAelPTqCgCdES0n233p
certif: nfIPaiJtK2pPOSViTGk=
certif: =opxg
certif: -----END PGP PUBLIC KEY BLOCK-----
+org: ORG-MISC01-RIPE
notify: watcher@somewhere.com
mnt-by: MAINT-EXAMPLECOM
admin-c: FR123-AP
View
21 t/165-Route.t
@@ -51,6 +51,18 @@ is( $object->origin(), 'AS1234', 'origin properly parsed' );
$object->origin('AS12');
is( $object->origin(), 'AS12', 'origin properly set' );
+# Test 'pingable'
+$tested{'pingable'}++;
+is_deeply( $object->pingable(), ['10.0.0.1'], 'pingable properly parsed' );
+$object->pingable('192.168.1.34');
+is( $object->pingable()->[1], '192.168.1.34', 'pingable properly added' );
+
+# Test 'ping_hdl'
+$tested{'ping_hdl'}++;
+is_deeply( $object->ping_hdl(), ['PING-EXAMPLECOM'], 'ping_hdl properly parsed' );
+$object->ping_hdl('PING2-EXAMPLECOM');
+is( $object->ping_hdl()->[1], 'PING2-EXAMPLECOM', 'ping_hdl properly added' );
+
# Test 'cross_mnt'
$tested{'cross_mnt'}++;
is_deeply( $object->cross_mnt(), ['CROSS-MAINT01'], 'cross_mnt properly parsed' );
@@ -69,6 +81,12 @@ is_deeply( $object->holes(), ['192.168.1.23'], 'holes properly parsed' );
$object->holes('192.168.1.123');
is( $object->holes()->[1], '192.168.1.123', 'holes properly added' );
+# Test 'org'
+$tested{'org'}++;
+is_deeply( $object->org(), ['ORG-MISC01-RIPE'], 'org properly parsed' );
+$object->org('ORG-MISC02-RIPE');
+is( $object->org()->[1], 'ORG-MISC02-RIPE', 'org properly added' );
+
# Test 'member_of'
$tested{'member_of'}++;
is_deeply( $object->member_of(), ['RTES-SET01'], 'member_of properly parsed' );
@@ -160,6 +178,7 @@ origin: AS1234
cross-mnt: CROSS-MAINT01
cross-nfy: watcher2@somewhere.com
holes: 192.168.1.23
+org: ORG-MISC01-RIPE
member_of: RTES-SET01
inject: RTR01
aggr_mtd: AAAAAAA
@@ -171,6 +190,8 @@ notify: watcher@somewhere.com
mnt-by: MAINT-EXAMPLECOM
mnt-lower: MAINT-EXAMPLECOM
mnt-routes: MAINT-EXAMPLECOM
+pingable: 10.0.0.1
+ping-hdl: PING-EXAMPLECOM
changed: abc@somewhere.com 20120131
source: RIPE
View
14 t/167-Route6.t
@@ -51,6 +51,18 @@ is( $object->origin(), 'AS1234', 'origin properly parsed' );
$object->origin('AS12');
is( $object->origin(), 'AS12', 'origin properly set' );
+# Test 'pingable'
+$tested{'pingable'}++;
+is_deeply( $object->pingable(), ['10.0.0.1'], 'pingable properly parsed' );
+$object->pingable('192.168.1.34');
+is( $object->pingable()->[1], '192.168.1.34', 'pingable properly added' );
+
+# Test 'ping_hdl'
+$tested{'ping_hdl'}++;
+is_deeply( $object->ping_hdl(), ['PING-EXAMPLECOM'], 'ping_hdl properly parsed' );
+$object->ping_hdl('PING2-EXAMPLECOM');
+is( $object->ping_hdl()->[1], 'PING2-EXAMPLECOM', 'ping_hdl properly added' );
+
# Test 'org'
$tested{'org'}++;
my $orgs = $object->org();
@@ -166,6 +178,8 @@ notify: watcher@somewhere.com
mnt-by: MAINT-EXAMPLECOM
mnt-lower: MAINT-EXAMPLECOM
mnt-routes: MAINT-EXAMPLECOM
+pingable: 10.0.0.1
+ping-hdl: PING-EXAMPLECOM
changed: abc@somewhere.com 20120131
source: RIPE
View
7 t/170-RouteSet.t
@@ -62,6 +62,12 @@ is_deeply( $object->remarks(), ['No remarks'], 'remarks properly parsed' );
$object->remarks('Added remarks');
is( $object->remarks()->[1], 'Added remarks', 'remarks properly added' );
+# Test 'org'
+$tested{'org'}++;
+is_deeply( $object->org(), ['ORG-MISC01-RIPE'], 'org properly parsed' );
+$object->org('ORG-MISC02-RIPE');
+is( $object->org()->[1], 'ORG-MISC02-RIPE', 'org properly added' );
+
# Test 'tech_c'
$tested{'tech_c'}++;
is_deeply( $object->tech_c(), ['TECH-CTCT'], 'tech_c properly parsed' );
@@ -118,6 +124,7 @@ mp-members: RTE-V6-01
mp-members: RTE-V6-02
mbrs-by-ref: RTE-MAINT01
remarks: No remarks
+org: ORG-MISC01-RIPE
tech-c: TECH-CTCT
admin-c: ADM-CTCT
notify: watcher@somewhere.com
View
7 t/175-PeeringSet.t
@@ -56,6 +56,12 @@ is_deeply( $object->remarks(), ['No remarks'], 'remarks properly parsed' );
$object->remarks('Added remarks');
is( $object->remarks()->[1], 'Added remarks', 'remarks properly added' );
+# Test 'org'
+$tested{'org'}++;
+is_deeply( $object->org(), ['ORG-MISC01-RIPE'], 'org properly parsed' );
+$object->org('ORG-MISC02-RIPE');
+is( $object->org()->[1], 'ORG-MISC02-RIPE', 'org properly added' );
+
# Test 'tech_c'
$tested{'tech_c'}++;
is_deeply( $object->tech_c(), ['TECH-CTCT'], 'tech_c properly parsed' );
@@ -110,6 +116,7 @@ peering: PRNG-OTHER
peering: AS1 at 9.9.9.1
mp-peering: PRNG-OTHERV6
remarks: No remarks
+org: ORG-MISC01-RIPE
tech-c: TECH-CTCT
admin-c: ADM-CTCT
notify: watcher@somewhere.com
View
23 t/190-Organisation.t
@@ -74,6 +74,18 @@ is_deeply( $object->e_mail(), ['someone@somewhere.com'], 'e_mail properly parsed
$object->e_mail('someone@elsewhere.com');
is( $object->e_mail()->[1], 'someone@elsewhere.com', 'e_mail properly added' );
+# Test 'geoloc'
+$tested{'geoloc'}++;
+is( $object->geoloc(), 'OTHER', 'geoloc properly parsed' );
+$object->geoloc('IANA');
+is( $object->geoloc(), 'IANA', 'geoloc properly set' );
+
+# Test 'language'
+$tested{'language'}++;
+is_deeply( $object->language(), ['FR','EN'], 'language properly parsed' );
+$object->language('ES');
+is( $object->language()->[2], 'ES', 'language properly added' );
+
# Test 'admin_c'
$tested{'admin_c'}++;
is_deeply( $object->admin_c(), ['CPNY-ADM'], 'admin_c properly parsed' );
@@ -110,6 +122,12 @@ is_deeply( $object->notify(), ['CPNY-MNT'], 'notify properly parsed' );
$object->notify('CPNY-MNT2');
is( $object->notify()->[1], 'CPNY-MNT2', 'notify properly added' );
+# Test 'abuse_mailbox'
+$tested{'abuse_mailbox'}++;
+is_deeply( $object->abuse_mailbox(), ['abuse1@somewhere.com','abuse2@somewhere.com'], 'abuse_mailbox properly parsed' );
+$object->abuse_mailbox('abuse3@somewhere.com');
+is( $object->abuse_mailbox()->[2], 'abuse3@somewhere.com', 'abuse_mailbox properly added' );
+
# Test 'descr'
$tested{'descr'}++;
is_deeply( $object->descr(), ['Providing happiness from 7am to 7pm'], 'descr properly parsed' );
@@ -151,12 +169,17 @@ address: France
phone: +33 1 75 75 75 01
fax-no: +33 1 75 75 75 91
e-mail: someone@somewhere.com
+geoloc: OTHER
+language: FR
+language: EN
admin-c: CPNY-ADM
tech-c: CPNY-TCH
ref-nfy: someone@somewhere.com
mnt-ref: CPNY-MNT
mnt-by: CPNY-MNT
notify: CPNY-MNT
+abuse-mailbox: abuse1@somewhere.com
+abuse-mailbox: abuse2@somewhere.com
changed: someone@somewhere.com 20120131
source: RIPE
Please sign in to comment.
Something went wrong with that request. Please try again.