Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 29 additions & 9 deletions validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export class PathfinderValidator {
body: `{data[*].created >= '${createdVariation[0]}'}`
}) : ({
status: 400,
body: "{code = 'NotImplemented'}"
body: JSON.stringify({code: 'NotImplemented'})
}))
}
]
Expand All @@ -312,7 +312,7 @@ export class PathfinderValidator {
body: `{'${productIdsVariation[0]}' in data[*].productIds}`
}) : ({
status: 400,
body: "{code = 'NotImplemented'}"
body: JSON.stringify({code: 'NotImplemented'})
}))
}
]
Expand Down Expand Up @@ -340,7 +340,7 @@ export class PathfinderValidator {
body: "{data.length == 1}"
}) : ({
status: 400,
body: "{code = 'NotImplemented'}"
body: JSON.stringify({code: 'NotImplemented'})
}))
}
]
Expand All @@ -364,7 +364,7 @@ export class PathfinderValidator {
},
response: {
status: 200,
body: "{data.id = '"+footprints[0].id+"'}"
body: JSON.stringify({data: {id: footprints[0].id}})
}
}
]
Expand Down Expand Up @@ -398,7 +398,7 @@ export class PathfinderValidator {
status: 200
}) : ({
status: 400,
body: "{code = 'NotImplemented'}"
body: JSON.stringify({code: 'NotImplemented'})
}))
}
]
Expand Down Expand Up @@ -436,11 +436,31 @@ export class PathfinderValidator {
status: 200
}) : ({
status: 400,
body: "{code = 'NotImplemented'}"
body: JSON.stringify({code: 'NotImplemented'})
}))
}
]
},
{
title: "Missing access token",
contextPath: dataContextPath,
sequence: [
{
path: pathPrefex + "/footprints",
method: "get",
request: {
headers: {
host: host,
"user-agent": userAgent
}
},
response: {
status: 403,
body: JSON.stringify({code: 'AccessDenied'})
}
}
]
},
{
title: "Illegal access token",
contextPath: dataContextPath,
Expand All @@ -456,8 +476,8 @@ export class PathfinderValidator {
}
},
response: {
status: 400,
body: "{code = 'BadRequest'}"
status: 403,
body: JSON.stringify({code: 'AccessDenied'})
}
}
]
Expand All @@ -481,7 +501,7 @@ export class PathfinderValidator {
},
response: {
status: 404,
body: "{code = 'NoSuchFootprint'}"
body: JSON.stringify({code: 'NoSuchFootprint'})
}
}
]
Expand Down