I’m looking to add tests around my Pulumi programs...
# general
f
I’m looking to add tests around my Pulumi programs.. what’s the current status on integration testing? I found: https://github.com/pulumi/pulumi/issues/2287 https://www.pulumi.com/blog/testing-your-infrastructure-as-code-with-pulumi/#deployment-testing
this:
By running a program through this integration test framework, you can ensure:
Your project’s code is syntactically well formed and runs without errors. Your stack’s configuration and secrets settings work and are interpreted correctly.Your project can be successfully deployed to your cloud provider of choice. Your project can be successfully updated from its starting state to N other states.Your project can be successfully destroyed and removed from your cloud provider. As we will see soon, you can also leverage this framework to perform runtime validation.
is really great direction
I’m thinking of using jest + puppeteer to verify that my apps and endpoints are up and running after automated deploys
but I have no clue on how to tests let’s say* IAM stuff
Copy code
import { pulumiCmd } from './pulumi-test.utilities';

describe('pulumi', () => {
  it('should be installed', () => {
    const cmd = pulumiCmd('version');
    const out = cmd.stdout || cmd.stderr || '';
    expect(out.toString()).toMatch(/v\d\.\d\.\d(.|\S)*/gi);
  });
});
so far so good with jest and typescript