forked from nextstrain/nextstrain.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
auspice_client_requests.json
167 lines (167 loc) · 6.05 KB
/
auspice_client_requests.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
[
{
"name": "Fetch core Nextstrain dataset (flu/seasonal/h3n2/ha/2y)",
"url": "/charon/getDataset?prefix=/flu/seasonal/h3n2/ha/2y",
"expectStatusCode": 200,
"responseIsJson": true,
"__comment": "We could define JSON schemas for each API and validate the response here"
},
{
"name": "Check that the dataset request for /flu redirects to a specific dataset",
"url": "/charon/getDataset?prefix=/flu",
"expectStatusCode": 302,
"responseIsJson": false,
"redirectsTo": "/charon/getDataset?prefix=flu%2Fseasonal%2Fh3n2%2Fha%2F2y"
},
{
"name": "Check that the main getAvailable API call returns a JSON",
"url": "/charon/getAvailable",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Check getSourceInfo API for a community (GitHub) URL",
"url": "/charon/getSourceInfo?prefix=/community/jameshadfield/scratch",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Check getDataset API call for a community source with no default datasets returns 204 (No Content)",
"url": "/charon/getDataset?prefix=/community/jameshadfield/scratch",
"expectStatusCode": 204
},
{
"name": "Check that getAvailable API call for a community source with datasets lists them",
"url": "/charon/getAvailable?prefix=/community/jameshadfield/scratch",
"expectStatusCode": 200
},
{
"name": "Check that getAvailable API call for a non-existent community source 404s",
"url": "/charon/getAvailable?prefix=/community/jameshadfield/doesntexist",
"expectStatusCode": 404
},
{
"name": "Check that getDataset works for a community build (Auspice v2 JSON)",
"url": "/charon/getDataset?prefix=/community/jameshadfield/scratch/placentalia",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Check that getDataset works for a community build (Auspice v1 JSON)",
"url": "/charon/getDataset?prefix=/community/jameshadfield/scratch/ct",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Check getSourceInfo API for a (public) nextstrain groups splash page",
"url": "/charon/getSourceInfo?prefix=/groups/blab/",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Check getSourceInfo API for a (private) nextstrain groups splash page",
"url": "/charon/getSourceInfo?prefix=/groups/blab-private/",
"expectStatusCode": 404
},
{
"name": "Check getAvailable API for a (public) nextstrain group",
"url": "/charon/getAvailable?prefix=/groups/blab/",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Check getDatset API for a (public) nextstrain group dataset",
"url": "/charon/getDataset?prefix=/groups/blab/sars-like-cov",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Check getDatset API for a dataset which doesn't exist returns 404",
"url": "/charon/getDataset?prefix=/ncov/doesntExist",
"expectStatusCode": 404
},
{
"name": "Check getDataset API for sidecar file tip-frequencies",
"url": "/charon/getDataset?prefix=/flu/seasonal/h3n2/ha/2y&type=tip-frequencies",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Fetch dataset using /fetch URLs (from S3 staging bucket)",
"url": "/charon/getDataset?prefix=/fetch/staging.nextstrain.org/flu_seasonal_h3n2_ha_2y.json",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Fetch dataset with a malformed API call",
"url": "/charon/getDataset",
"expectStatusCode": 400
},
{
"name": "Fetch dataset which doesn't exist",
"url": "/charon/getDataset?prefix=/ncov/XXXX-XX-XX",
"expectStatusCode": 404
},
{
"name": "Check getDataset API for non-existing a sidecar file tip-frequencies which doesn't exist",
"__comment": "Auspice only makes such a request if the dataset JSON indicates that the frequency panel is to be displayed",
"url": "/charon/getDataset?prefix=/ncov/2020-01-23&type=tip-frequencies",
"expectStatusCode": 404
},
{
"name": "Fetch sidecar file using /fetch URLs (root-sequence JSON from S3 staging bucket)",
"url": "/charon/getDataset?prefix=/fetch/staging.nextstrain.org/flu_seasonal_h3n2_ha_2y.json&type=root-sequence",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Fetch narrative using /fetch URLs (from nextstrain/narratives GitHub repo)",
"url": "/charon/getNarrative?prefix=/fetch/narratives/raw.githubusercontent.com/nextstrain/narratives/master/intro-to-narratives.md&type=md",
"expectStatusCode": 200
},
{
"name": "Fetch (core) narrative",
"__comment": "This fetch will fetch data from a GitHub repo (where our core narratives live)",
"url": "/charon/getNarrative?prefix=/narratives/ncov/sit-rep/2020-05-15&type=md",
"expectStatusCode": 200,
"responseIsJson": false
},
{
"name": "Fetch narrative without specifying a type (invalid request)",
"url": "/charon/getNarrative?prefix=/narratives/ncov/sit-rep/2020-05-15",
"expectStatusCode": 400
},
{
"name": "Fetch narrative which doesn't exist",
"url": "/charon/getNarrative?prefix=/narratives/ncov/sit-rep/XXXX-XX-XX&type=md",
"expectStatusCode": 404
},
{
"name": "Attempt to access a private Nextstrain Group when not logged in",
"url": "/charon/getAvailable?prefix=/groups/blab-private",
"expectStatusCode": 404
},
{
"name": "Get Source Info for a group which doesn't exist",
"url": "/charon/getSourceInfo?prefix=/groups/doesntexist",
"expectStatusCode": 404
},
{
"name": "Getting Source Info for the core nextstrain source",
"__comment": "Used by the (customized) auspice splash page to list datasets",
"url": "/charon/getSourceInfo?prefix=/zika",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Getting Source Info for the staging nextstrain source",
"url": "/charon/getSourceInfo?prefix=/staging",
"expectStatusCode": 200,
"responseIsJson": true
},
{
"name": "Unknown charon address should 404",
"url": "/charon/unknown",
"expectStatusCode": 404
}
]