Add request method and path GUCs

This commit is contained in:
steve-chavez
2020-01-21 12:28:05 -05:00
committed by Steve Chavez
parent b20e1150a5
commit 7dade7f466
4 changed files with 25 additions and 2 deletions
+17 -1
View File
@@ -557,7 +557,7 @@ spec actualPgVersion =
{ matchStatus = 200
, matchHeaders = [ matchContentTypeJson ]
}
it "allows getting the Authorization value" $
it "gets the Authorization value" $
request methodPost "/rpc/get_guc_value" [authHeaderJWT "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoicG9zdGdyZXN0X3Rlc3RfYXV0aG9yIn0.Xod-F15qsGL0WhdOCr2j3DdKuTw9QJERVgoFD3vGaWA"]
[json| {"name":"request.header.authorization"} |]
`shouldRespondWith`
@@ -565,6 +565,22 @@ spec actualPgVersion =
{ matchStatus = 200
, matchHeaders = []
}
it "gets the http method" $
request methodPost "/rpc/get_guc_value" []
[json| {"name":"request.method"} |]
`shouldRespondWith`
[str|"POST"|]
{ matchStatus = 200
, matchHeaders = []
}
it "gets the http path" $
request methodPost "/rpc/get_guc_value" []
[json| {"name":"request.path"} |]
`shouldRespondWith`
[str|"/rpc/get_guc_value"|]
{ matchStatus = 200
, matchHeaders = []
}
context "binary output" $ do
context "Proc that returns scalar" $ do