is .env supposed loaded in test?
# sst
m
is .env supposed loaded in test?
f
Hey @Mike McCall, they are not currently.
What’s ur use case?
m
running test locally
few resources have specific arns (cross acccount secrets)
f
Are they usually the same as a specific stage? Or are the values going to be different?
I’ve seen for React, they have a
.env.test
file
m
in this case they are the same. We use stages, but overall it doesn’t mean much because each env is in its own account
actually, in this case the value doesn’t matter. We are just checking the existence of it
f
Got it. Let me put something in this week.
m
no rush!
FWIW we mostly use direnv in house. I could see how loading something specific like
env.test
could be beneficial though. We could commit it.
f
Hey @Mike McCall, just added .env support for running tests in v0.35.1
.env.test
.env.local
and
.env
are loaded
m
Awesome. Thanks for the update!
d
I think a recent commit broke the ability to load .env.test while running tests: https://github.com/serverless-stack/serverless-stack/commit/7976a797776478ea8a1049086d474e3f61e4d010#r56409401
f
Let me pull in @thdxr
t
yep that looks right will fix tonight
d
want me to make a pull request?
t
that would be great 👍🏽
d
cool: https://github.com/serverless-stack/serverless-stack/pull/812 i went too fast and didn’t read the guidelines. hope it’s all good.