Skip to content

Commit d693691

Browse files
committed
Update docs and examples
1 parent 8acdc5c commit d693691

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -373,24 +373,24 @@ The top-level structure of the configuration file is
373373
"file": "HAPI CSV file"
374374
"fileformat": "one of 'csv', 'binary', 'json'"
375375
or
376-
"url": "URL that returns HAPI CSV"
376+
"url": "URL that returns HAPI data"
377377
"urlformat": "one of 'csv', 'binary', 'json'"
378378
"contact": "Email address if error in command line program",
379379
"testcommands": [
380380
{
381381
"command": string,
382-
"lines": integer,
383-
"bytes": integer,
384-
"md5", string
382+
"Nlines": integer,
383+
"Nbytes": integer,
384+
"Ncommas", integer
385385
},
386386
...
387387
]
388388
"testurls": [
389389
{
390390
"url": string,
391-
"lines": integer,
392-
"length": integer,
393-
"md5", string
391+
"Nlines": integer,
392+
"Nbytes": integer,
393+
"Ncommas": integer
394394
},
395395
...
396396
]

lib/test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ function testoutput(testobj,body) {
118118
}
119119
}
120120

121-
if ("length" in testobj) {
122-
compare(body.length,testobj.length,'bytes');
121+
if ("Nbytes" in testobj) {
122+
compare(body.length,testobj.Nbytes,'bytes');
123123
}
124124
if ("Nlines" in testobj) {
125-
compare(body.split("\n").length - 1,testobj.Nlines,'# lines');
125+
compare(body.split("\n").length - 1,testobj.Nlines,'lines');
126126
}
127127
if ("Ncommas" in testobj) {
128-
compare((body.match(/,/g) || []).length,testobj.Ncommas,'# commas');
128+
compare((body.match(/,/g) || []).length,testobj.Ncommas,'commas');
129129
}
130130
}

metadata/Example8.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"fileformat": "csv",
55
"contact": "[email protected]",
66
"testurls": [
7-
{"url": "${server}/data/?id=dataset1&parameters=vector&time.min=1970-01-01T00:00:00Z&time.max=1970-01-01T00:10:00Z", "length": 4190, "Nlines": 50},
8-
{"url": "${server}/data/?id=dataset1&parameters=vector&time.min=1970-01-01T00:00:50Z&time.max=1970-01-01T00:01:00Z", "length": 834, "Nlines": 10}
7+
{"url": "${server}/data/?id=dataset1&parameters=vector&time.min=1970-01-01T00:00:00Z&time.max=1970-01-01T00:10:00Z", "Nbytes": 4190, "Nlines": 50},
8+
{"url": "${server}/data/?id=dataset1&parameters=vector&time.min=1970-01-01T00:00:50Z&time.max=1970-01-01T00:01:00Z", "Nbytes": 834, "Nlines": 10}
99
]
1010
},
1111
"catalog":

metadata/Example9.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"urlformat": "csv",
55
"contact": "[email protected]",
66
"testurls": [
7-
{"url": "${server}/data/?id=dataset1&parameters=scalar,vector&time.min=1970-01-01T00:00:00Z&time.max=1970-01-01T00:00:10Z", "length": 1003, "Nlines": 10}
7+
{"url": "${server}/data/?id=dataset1&parameters=scalar,vector&time.min=1970-01-01T00:00:00Z&time.max=1970-01-01T00:00:10Z", "Nbytes": 1003, "Nlines": 10}
88
]
99
},
1010
"catalog": "http://hapi-server.org/servers/TestData/hapi/catalog"

metadata/TestData.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
{"url": "${server}/data/?id=dataset1&parameters=scalar&time.min=1970-01-01T00:00:10Z&time.max=1970-01-01T00:00:20Z", "Nlines": 0}
99
],
1010
"testcommands": [
11-
{"command": "$NODEEXE $HAPISERVERPATH/bin/TestData.js --id dataset1 --parameters scalar --start 1970-01-01T00:00:00.000000000Z --stop 1970-01-01T00:00:10Z", "Nlines": 10},
12-
{"command": "$NODEEXE $HAPISERVERPATH/bin/TestData.js --id dataset1 --parameters scalar --start 1970-01-01T00:00:10.000000000Z --stop 1970-01-01T00:00:20Z", "Nlines": 10}
11+
{"command": "$NODEEXE $HAPISERVERPATH/bin/TestData.js --id dataset1 --parameters scalar --start 1970-01-01T00:00:00.000000000Z --stop 1970-01-01T00:00:10.000000000Z", "Nlines": 10},
12+
{"command": "$NODEEXE $HAPISERVERPATH/bin/TestData.js --id dataset1 --parameters scalar --start 1970-01-01T00:00:10.000000000Z --stop 1970-01-01T00:00:20.000000000Z", "Nlines": 0}
1313
]
1414
},
1515
"catalog" :

0 commit comments

Comments
 (0)