https://pulumi.com logo
Title
s

shy-window-64655

12/16/2019, 8:46 AM
Hi, I see the ~\pulumi\examples\kubernetes-cs-guestbook\components\ServiceDeployment.cs code and doubt that there is mismatching with
base ctor
signature call (lines 31-32):
public ServiceDeployment(string name, ServiceDeploymentArgs args, ComponentResourceOptions? opts = null)
        : base(name, "k8sx:service:ServiceDeployment", opts)
Am I right? (looks like the
base ctor
waits for the
string type
argument in the first place rather second).
t

tall-librarian-49374

12/16/2019, 9:00 AM
Great catch! I'll open a PR.
s

shy-window-64655

12/16/2019, 9:04 AM
Ok, and to follow up: is there some technique or approach to make Unit tests for Pulumi Components to avoid such situations?
t

tall-librarian-49374

12/16/2019, 9:08 AM
One could check the shape of Type to match aaa:bbb:ccc
s

shy-window-64655

12/16/2019, 9:21 AM
Hm, this means that I'll got an error on
up
or
preview
, but it would be nice to ensure of Components stability on early time (before one will pushed to Nuget\npm feed).
In general, this particular case with signature is not so important. If the Pulumi is positioned with the really GREAT(!) advantage of using natural programming languages, I believe that there should be also room for natural developing process (with Unit tests in the toolbox).
As an idea: there is some Mock (or Stub) Framework that could abstract out of the real cloud providers and their real resources, just to ensure of the Pulumi side work is correct. Have the Pulumi team ever been thought about this thing?
These are TypeScript but the same can be applied to .NET
There is https://github.com/pulumi/pulumi/issues/3633 to track .NET testing
s

shy-window-64655

12/16/2019, 10:16 AM
Great job! Thanks a lot! I'm newby with Pulumi (just met at the last week), and not so familiar with all related resources to lern about Pulumi better. (just started to read the main blog, watch PulumiTV and explore Docs and this Slack channel)
t

tall-librarian-49374

12/16/2019, 10:23 AM
That's great Omar! .NET is still in preview, so docs are lacking. Feel free to ask more questions here!