Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load a single value secret with loadSecret #6

Open
cajubelt opened this issue Aug 23, 2021 · 0 comments
Open

Cannot load a single value secret with loadSecret #6

cajubelt opened this issue Aug 23, 2021 · 0 comments

Comments

@cajubelt
Copy link
Contributor

Currently it is expected that secrets will be of the format

FOO=bar

But if they are just

my_secret

then they fail to parse. This should at least be documented, and ideally fixed.

Put another way, this test fails:

  it('still works if secret is single value', async () => {
    const fakeClient = {
      accessSecretVersion: async () => {
        return [{
          payload: {
            data: 'single_value_secret'
          }
        }]
      }
    } as unknown as SecretManagerServiceClient
    await expect(await loadSecret('/foo', fakeClient)).toBe('single_value_secret')
  })

AC:

  • in-code docs updated to describe behavior parsing single-value secrets
  • (optionally) test from description passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant