Skip to content

Commit 048474b

Browse files
committed
add test examples
1 parent 02f8ef2 commit 048474b

File tree

2 files changed

+120
-0
lines changed

2 files changed

+120
-0
lines changed

tests/CTS/requests/composition-full/putComposition.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,76 @@
6161
}
6262
}
6363
}
64+
},
65+
{
66+
"parameters": {
67+
"compositionID": "my-external-injection-compo",
68+
"composition": {
69+
"objectID": "my-external-injection-compo",
70+
"name": "my first composition",
71+
"behavior": {
72+
"injection": {
73+
"main": {
74+
"source": {
75+
"search": {
76+
"index": "foo"
77+
}
78+
}
79+
},
80+
"injectedItems": [
81+
{
82+
"key": "injectedItem1",
83+
"source": {
84+
"external": {
85+
"index": "foo",
86+
"ordering": "userDefined",
87+
"params": {
88+
"filters": "brand:adidas"
89+
}
90+
}
91+
},
92+
"position": 2,
93+
"length": 1
94+
}
95+
]
96+
}
97+
}
98+
}
99+
},
100+
"request": {
101+
"path": "/1/compositions/my-external-injection-compo",
102+
"method": "PUT",
103+
"body": {
104+
"objectID": "my-external-injection-compo",
105+
"name": "my first composition",
106+
"behavior": {
107+
"injection": {
108+
"main": {
109+
"source": {
110+
"search": {
111+
"index": "foo"
112+
}
113+
}
114+
},
115+
"injectedItems": [
116+
{
117+
"key": "injectedItem1",
118+
"source": {
119+
"external": {
120+
"index": "foo",
121+
"ordering": "userDefined",
122+
"params": {
123+
"filters": "brand:adidas"
124+
}
125+
}
126+
},
127+
"position": 2,
128+
"length": 1
129+
}
130+
]
131+
}
132+
}
133+
}
134+
}
64135
}
65136
]

tests/CTS/requests/composition-full/search.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,54 @@
1313
"params": { "query": "batman" }
1414
}
1515
}
16+
},
17+
{
18+
"parameters": {
19+
"compositionID": "foo",
20+
"requestBody": {
21+
"params": {
22+
"query": "batman",
23+
"injectedItems": {
24+
"injectedItem1": {
25+
"items": [
26+
{
27+
"objectID": "my-object-1"
28+
},
29+
{
30+
"objectID": "my-object-2",
31+
"metadata": {
32+
"my-key": "my-value"
33+
}
34+
}
35+
]
36+
}
37+
}
38+
}
39+
}
40+
},
41+
"request": {
42+
"path": "/1/compositions/foo/run",
43+
"method": "POST",
44+
"body": {
45+
"params": {
46+
"query": "batman",
47+
"injectedItems": {
48+
"injectedItem1": {
49+
"items": [
50+
{
51+
"objectID": "my-object-1"
52+
},
53+
{
54+
"objectID": "my-object-2",
55+
"metadata": {
56+
"my-key": "my-value"
57+
}
58+
}
59+
]
60+
}
61+
}
62+
}
63+
}
64+
}
1665
}
1766
]

0 commit comments

Comments
 (0)