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

New-TestResource: support different output formats #2463

Closed
tjprescott opened this issue Dec 16, 2021 · 1 comment
Closed

New-TestResource: support different output formats #2463

tjprescott opened this issue Dec 16, 2021 · 1 comment
Assignees
Labels
Central-EngSys This issue is owned by the Engineering System team.

Comments

@tjprescott
Copy link
Member

tjprescott commented Dec 16, 2021

Currently, running, New-TestResources will yield one of three outputs:

  • Copy-pasta for Powershell environment variables if you run the *.ps1 script plain
  • Copy-pasta for CMD environment variables if you run the *.CMD script plain
  • An encrypted test-resources.json.env file if you run the script with -OutFile

This is limiting. For Python, the test-proxy supports loading environment variables via a .env file, which is just key=value pairs, but there is no simple way to transform the output of the script into this. It would be great to simply output directly to file or be able to pipe to file.

I have typically just used the copy-pasta to set the environment variables in my VSCode terminal, but the VSCode debugger doesn't see these unless they are in the .env file. Manually copy and pasting values into that file adds an unnecessary level of inefficiency, but is currently the only viable end-to-end solution.

Even if I could just copy-paste the output of the script into the .env file, it would be a productivity win.

cc/ @lmazuel @mccoyp

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Dec 16, 2021
@kurtzeborn kurtzeborn added Central-EngSys This issue is owned by the Engineering System team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jan 3, 2022
@kurtzeborn kurtzeborn assigned scbedd and benbp and unassigned scbedd Jan 3, 2022
@kurtzeborn
Copy link
Member

At this point, we're probably not going to fix this as suggested. The strategy we intend to follow instead is a more dynamic strategy which retrieves secrets from the tests based on the users credentials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Central-EngSys This issue is owned by the Engineering System team.
Projects
None yet
Development

No branches or pull requests

4 participants