diff --git a/package-lock.json b/package-lock.json index 03732590..e58810b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@types/node-fetch": "^2.6.2", "body-parser": "^1.19.0", "express": "^4.18.2", - "google-protobuf": "^3.18.0", + "google-protobuf": "^3.18.0 <3.21.4", "http-terminator": "^3.2.0", "node-fetch": "^2.6.7" }, diff --git a/package.json b/package.json index d5d5f8f1..18041a07 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@types/node-fetch": "^2.6.2", "body-parser": "^1.19.0", "express": "^4.18.2", - "google-protobuf": "^3.18.0", + "google-protobuf": "^3.18.0 <3.21.4", "http-terminator": "^3.2.0", "node-fetch": "^2.6.7" }, diff --git a/test/components/secret-file.yaml b/test/components/secret-file.yaml new file mode 100644 index 00000000..6e6366fe --- /dev/null +++ b/test/components/secret-file.yaml @@ -0,0 +1,24 @@ +# +# Copyright 2022 The Dapr Authors +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: secret-file + namespace: default +spec: + type: secretstores.local.file + version: v1 + metadata: + - name: secretsFile + value: test/components/secrets.json \ No newline at end of file diff --git a/test/components/secrets.json b/test/components/secrets.json new file mode 100644 index 00000000..b136158a --- /dev/null +++ b/test/components/secrets.json @@ -0,0 +1,3 @@ +{ + "TEST_SECRET_1": "secret_value_1" +} \ No newline at end of file diff --git a/test/e2e/grpc/client.test.ts b/test/e2e/grpc/client.test.ts index 842b733e..cc0961bf 100644 --- a/test/e2e/grpc/client.test.ts +++ b/test/e2e/grpc/client.test.ts @@ -175,6 +175,11 @@ describe("grpc/client", () => { const res = await client.secret.getBulk("secret-envvars"); expect(Object.keys(res).length).toBeGreaterThan(1); }); + + it("should be able to correctly fetch the secrets in bulk from a file", async () => { + const res = await client.secret.getBulk("secret-file"); + expect(Object.keys(res).length).toBeGreaterThan(0); + }); }); describe("crypto", () => {