feat: add v2 api consumer bootstrap endpoints
This commit is contained in:
parent
e1c0f46a67
commit
75ad691dd6
8 changed files with 285 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ import Web.Controller.Api.V2.InteractionEvents
|
|||
import Web.Controller.Api.V2.Hubs (missingRequiredFields, validCreateHubKind)
|
||||
import Web.Controller.Api.V2.HubCapabilityManifests
|
||||
( jsonArrayTexts, textArrayFieldFromJsonBody )
|
||||
import Web.Controller.Api.V2.ApiConsumers (positiveLimit)
|
||||
import Web.Controller.Api.V2.Widgets (missingWidgetCreateFields, validWidgetStatus)
|
||||
|
||||
main :: IO ()
|
||||
|
|
@ -87,4 +88,10 @@ main = hspec do
|
|||
jsonArrayTexts (toJSON (["ops-endpoint-card", "ops-alert-panel"] :: [Text]))
|
||||
`shouldBe` ["ops-endpoint-card", "ops-alert-panel"]
|
||||
|
||||
describe "API v2 API consumer bootstrap validation" do
|
||||
it "requires positive rate-limit and quota values" do
|
||||
positiveLimit 1 `shouldBe` True
|
||||
positiveLimit 0 `shouldBe` False
|
||||
positiveLimit (-1) `shouldBe` False
|
||||
|
||||
LayerBoundary.spec
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue