Skip to content

Mocking Account numbers #26

@rpattcorner

Description

@rpattcorner

#25 Now that IAM seems fully supported it's looking like pytest-localstack is the best and only game in town for testing mocks in multi-account environments. And multi-account is becoming more widely used, as the GCP-originated paradigm of treating an account as a project for security isolation is growing.

From what I can tell, pytest-localstack's mapping of "docker container to session fixture to account" is a great way to go, and it would be even better if we could mock account numbers on a per-fixture basis. Currently all sessions have a mocked account number of '000000000000', but it might be simple enough to add mock_account_number as a parameter to the fixture so we could devise cross-account tests that took ARNs into account.

Automatic generation of account numbers might be possible or desirable too, but a fixture parameter that overrides the zeros might easily be enough.

Just a thought to make a good thing better ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions