Skip to content

Feat: Ship test-doubles/fakes together with the charm lib #343

@MichaelThamm

Description

@MichaelThamm

Enhancement Proposal

It would be ideal if (from ref)

The team that owns the real implementation of the charm lib should write and maintain the fake.
Without up-to-date test doubles, other engineers will pollute their charm tests with mocks, which could quickly get out of sync with the real implementation.

Currently, if we want to scenario test we would have to place dummy certificate data in the remote_app_data:

    ssc = Relation(
        endpoint="certificates",
        interface="tls-certificate",
        remote_app_data={
            "certificates": json.dumps(
                [
                    {
                        "certificate": "placeholder",
                        "certificate_signing_request": "placeholder",
                        "ca": "placeholder",
                        "chain": ["first", "second"],
                    }
                ]
            )
        },
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions