You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of pulumi/home#4417
While working on pulumi/pulumi-gcp#3460, I
discovered that the version of `@pulumi/pulumi-gcp` used on the NodeJS
tests was not the module under test: We were effectively testing against
old versions of the library instead of using the NodeJS provider SDK
release candidates.
I am adding a new `opttest.Option` boolean flag `RequireYarnLinks` that
will gate the behavior of when `YarnLinks` have not been set.
`RequireYarnLinks` has three possible values:
* `nil` (or unset): Logs a warning if a NodeJS pulumi project does not
specify at least one `YarnLink`.
* `true`: Fail the test if there's not at least one `YarnLink`.
* `false`: Suppress warning and silently ignore that there are no
`YarnLink`s set. I am not sure if this would be immediately useful, but
there may be some potential use case I don't know yet.
Moving forward, on the next `pulumitest` major version bump, we should
make the `RequireYarnLinks` flag default to `true`: That would mean that
test authors would need to explicitly opt-out from requiring at least
one `YarnLink`.
ptLogF(t, "WARNING: YarnLinks were not set, but project runtime is nodejs. Module under test may not be used. Pass RequireYarnLinks(false) to silence this warning.")
157
+
} elseif*options.RequireYarnLinks {
158
+
ptFatalF(t, "module under test may not be used: YarnLinks were not set, but project runtime is nodejs and RequireYarnLinks is true.")
159
+
} else {
160
+
// User decided to silence the warning explicitly by passing RequireYarnLinks(false)
0 commit comments