Allow setting environment variables in setup hook - #44
Conversation
Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com>
Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com>
|
@copilot Ensure there's a test that covers this behavior, to ensure envs which are set in setup are present in the test, and those that aren't set, are not available |
Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com>
Added
This ensures proper isolation of the test environment. Commit: 063cd77 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
imjasonh
left a comment
There was a problem hiding this comment.
@copilot I want to mimic as much as possible (idiomatically for Rust) the behavior of https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript#Env
Does that require sh -c to be able to get the values of the env? That library also supports env which just prints the full env vars, do we do that too?
Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com>
Environment variables set in setup (or via However, shell variable expansion syntax like The
Commit: 7282682 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com>
Head branch was pushed to by a user without write access
|
... Fixed formatting to single line. Commit: 229e22d Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Plan: Support passing env vars into test environment in
setupSetupFntype alias inparams.rsto accept&mut TestEnvironmentinstead of&TestEnvironmentsetupmethod signature inparams.rsto acceptFn(&mut TestEnvironment)instead ofFn(&TestEnvironment)setupmethod signature inlib.rsBuilder to acceptFn(&mut TestEnvironment)instead ofFn(&TestEnvironment)execution.rsto pass&mut envto setup functionsetup_hook.rsto test the new functionality (make it pass)Original prompt
setup#43✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.