-
Notifications
You must be signed in to change notification settings - Fork 7
/
tests.yml
142 lines (141 loc) · 4.32 KB
/
tests.yml
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
################################################################################
# This document contains a language-agnostic set of test cases for validating
# language implementations.
#
# The format of this document is as follows:
#
# rootURLs: <A dictionary of cluster names to an array of valid rootURLs for
# the cluster; cluster names can be anything, used simply as a key
# for tests below>
# tests:
# function: [api, apiReference, docs, exchangeReference, schema, ui]
# argSets: <A list of list of args to call the function with>
# expected: <A dictionary of cluster names (see above) to expected URLs for
# the given function call>
#
# The specification for generating URLs that the libraries in this repository
# implement, is defined in `docs/urls-spec.md`.
#################################################################################
---
rootURLs:
new:
- https://taskcluster.example.com
- https://taskcluster.example.com/
- https://taskcluster.example.com//
invalid:
- '12345'
empty:
- ''
tests:
- function: api
argSets:
- [auth, v1, ping]
- [auth, v1, /ping]
- [auth, v1, //ping]
expected:
new: https://taskcluster.example.com/api/auth/v1/ping
invalid: 12345/api/auth/v1/ping
empty: /api/auth/v1/ping
- function: api
argSets:
- [auth, v1, foo/ping]
- [auth, v1, /foo/ping]
- [auth, v1, //foo/ping]
expected:
new: https://taskcluster.example.com/api/auth/v1/foo/ping
invalid: 12345/api/auth/v1/foo/ping
empty: /api/auth/v1/foo/ping
- function: docs
argSets:
- [something/in/docs]
- [/something/in/docs]
- [//something/in/docs]
expected:
new: https://taskcluster.example.com/docs/something/in/docs
invalid: 12345/docs/something/in/docs
empty: /docs/something/in/docs
- function: schema
argSets:
- [auth, v1/something.json]
- [auth, /v1/something.json]
- [auth, //v1/something.json]
expected:
new: https://taskcluster.example.com/schemas/auth/v1/something.json
invalid: 12345/schemas/auth/v1/something.json
empty: /schemas/auth/v1/something.json
- function: schema
argSets:
- [auth, v2/something.json]
- [auth, /v2/something.json]
- [auth, //v2/something.json]
expected:
new: https://taskcluster.example.com/schemas/auth/v2/something.json
invalid: 12345/schemas/auth/v2/something.json
empty: /schemas/auth/v2/something.json
- function: apiReferenceSchema
argSets:
- [v1]
expected:
new: https://taskcluster.example.com/schemas/common/api-reference-v1.json
invalid: 12345/schemas/common/api-reference-v1.json
empty: /schemas/common/api-reference-v1.json
- function: exchangesReferenceSchema
argSets:
- [v1]
expected:
new: https://taskcluster.example.com/schemas/common/exchanges-reference-v1.json
invalid: 12345/schemas/common/exchanges-reference-v1.json
empty: /schemas/common/exchanges-reference-v1.json
- function: apiManifestSchema
argSets:
- [v1]
expected:
new: https://taskcluster.example.com/schemas/common/manifest-v1.json
invalid: 12345/schemas/common/manifest-v1.json
empty: /schemas/common/manifest-v1.json
- function: metadataMetaschema
argSets:
- [v1]
expected:
new: https://taskcluster.example.com/schemas/common/metadata-metaschema.json
invalid: 12345/schemas/common/metadata-metaschema.json
empty: /schemas/common/metadata-metaschema.json
- function: apiReference
argSets:
- [auth, v1]
expected:
new: https://taskcluster.example.com/references/auth/v1/api.json
invalid: 12345/references/auth/v1/api.json
empty: /references/auth/v1/api.json
- function: exchangeReference
argSets:
- [auth, v1]
expected:
new: https://taskcluster.example.com/references/auth/v1/exchanges.json
invalid: 12345/references/auth/v1/exchanges.json
empty: /references/auth/v1/exchanges.json
- function: ui
argSets:
- [something]
- [/something]
- [//something]
expected:
new: https://taskcluster.example.com/something
invalid: 12345/something
empty: /something
- function: ui
argSets:
- ['']
- [/]
- [//]
expected:
new: https://taskcluster.example.com/
invalid: 12345/
empty: /
- function: apiManifest
argSets:
- []
expected:
new: https://taskcluster.example.com/references/manifest.json
invalid: 12345/references/manifest.json
empty: /references/manifest.json