Skip to content

Commit 95f4e5e

Browse files
committed
test: add some tests for collection auth
1 parent 13ce88e commit 95f4e5e

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

collection_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ func (suite *CollectionTestSuite) SetupTest() {
8585
Items: make([]*Items, 0),
8686
},
8787
},
88+
Auth: Auth{
89+
Type: "bearer",
90+
Bearer: []*AuthParam{
91+
{
92+
Key: "token",
93+
Value: "a-bearer-token",
94+
},
95+
},
96+
},
8897
Variables: []*Variable{
8998
{
9099
Name: "a-global-collection-variable",
@@ -174,6 +183,16 @@ func (suite *CollectionTestSuite) SetupTest() {
174183
Items: make([]*Items, 0),
175184
},
176185
},
186+
Auth: Auth{
187+
Type: "bearer",
188+
Bearer: []*AuthParam{
189+
{
190+
Type: "string",
191+
Key: "token",
192+
Value: "a-bearer-token",
193+
},
194+
},
195+
},
177196
Variables: []*Variable{
178197
{
179198
Name: "a-global-collection-variable",

testdata/collection_v2.0.0.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
2+
"auth": {
3+
"type": "bearer",
4+
"bearer": {
5+
"token": "a-bearer-token"
6+
}
7+
},
28
"info": {
39
"name": "Go Collection",
410
"description": "Awesome description",

testdata/collection_v2.1.0.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
{
2-
"auth": {},
2+
"auth": {
3+
"type": "bearer",
4+
"bearer": [
5+
{
6+
"key": "token",
7+
"value": "a-bearer-token",
8+
"type": "string"
9+
}
10+
]
11+
},
312
"info": {
413
"name": "Go Collection",
514
"description": "Awesome description",

0 commit comments

Comments
 (0)