Revision 1953
Added by Matt Jones over 19 years ago
test.pl | ||
---|---|---|
40 | 40 |
# Insert your test code below (better if it prints "ok 13" |
41 | 41 |
# (correspondingly "not ok 13") depending on the success of chunk 13 |
42 | 42 |
# of the test code): |
43 |
my $metacatUrl = "http://dev.nceas.ucsb.edu/jones/servlet/metacat";
|
|
44 |
my $username = 'jones';
|
|
43 |
my $metacatUrl = "http://snow.joneseckert.org:8080/knb/servlet/metacat";
|
|
44 |
my $username = 'uid=jones,o=NCEAS,dc=ecoinformatics,dc=org';
|
|
45 | 45 |
my $password = 'your-pw-goes-here'; |
46 | 46 |
|
47 | 47 |
# Set up a date stamp |
... | ... | |
60 | 60 |
my $timenow="$mday-$thismon-$year $hour:$minstr:$secstr"; |
61 | 61 |
|
62 | 62 |
# Set up a document accession number to use |
63 |
my $docroot = "$thismon$mday.$minstr."; |
|
63 |
my $scope = "$thismon$mday"; |
|
64 |
my $docroot = "$scope.$minstr."; |
|
64 | 65 |
my $docrev = 1; |
65 | 66 |
|
66 | 67 |
# Chunk 2: Test metacat object creation |
... | ... | |
129 | 130 |
print $metacat->getMessage(); |
130 | 131 |
print "not ok 8 delete\n"; |
131 | 132 |
} |
133 |
|
|
134 |
# Chunk 9: Test metacat getlastid |
|
135 |
my $response = $metacat->getLastId("$scope"); |
|
136 |
if ($response) { |
|
137 |
print "ok 9 getlastid ($response)\n"; |
|
138 |
} else { |
|
139 |
print $metacat->getMessage(); |
|
140 |
print "not ok 9 getlastid\n"; |
|
141 |
} |
Also available in: Unified diff
Added new function "getLastId" to the Metacat.pm perl Metacat client. Returns
the hisghest docid in use in a given scope.