mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-24 07:43:24 +00:00
Provider returns secrets for a function
This commit allows the provider to return a list of the names of the secrets mapped into an openfaas function. This was tested by building and deploying faasd on multipass and curling the provider directly and seeing the returned secrets list! Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This commit is contained in:
@ -15,14 +15,14 @@ func Test_InfoHandler(t *testing.T) {
|
||||
r := httptest.NewRequest("GET", "/", nil)
|
||||
handler(w, r)
|
||||
|
||||
resp := types.InfoResponse{}
|
||||
resp := types.ProviderInfo{}
|
||||
err := json.Unmarshal(w.Body.Bytes(), &resp)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error unmarshalling the response")
|
||||
}
|
||||
|
||||
if resp.Provider != ProviderName {
|
||||
t.Fatalf("expected provider %q, got %q", ProviderName, resp.Provider)
|
||||
if resp.Name != ProviderName {
|
||||
t.Fatalf("expected provider %q, got %q", ProviderName, resp.Name)
|
||||
}
|
||||
|
||||
if resp.Orchestration != OrchestrationIdentifier {
|
||||
|
Reference in New Issue
Block a user