Skip to content

Add importer and provisioner test helpers - #34

Merged
Marton6 merged 9 commits into
simplified-importer-schemafrom
importer-test-suite
Nov 19, 2022
Merged

Marton6 merged 9 commits into
simplified-importer-schemafrom
importer-test-suite

Conversation

@florisvdg

@florisvdg florisvdg commented Nov 17, 2022 •

Copy link
Copy Markdown
Contributor

This PR adds test helpers for testing importers:

  • plugintest.TestImporter(t, importer, cases) which runs the cases one by one and sets up the test environment for each case.
  • plugintest.TestProvisioner(t, provisioner, cases) which runs the cases one by one based on the item fields specified.
  • plugintest.LoadFixture(fixtureName) which loads the given test fixture from the plugin's test-fixtures directory.

The goal is to make barrier for adding importer tests as low as possible.

To see how these work in action, I'm using the helpers in tests for GitLab, Okta, and Heroku.

Depends on #33

@florisvdg florisvdg changed the title Add importer test helpers Add importer and provisioner test helpers Nov 18, 2022

@Marton6 Marton6 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One important comment and a small suggestion. Otherwise it looks good. I really like the simple signatures of the test helpers!

@Marton6
Marton6 merged commit 30b79e4 into simplified-importer-schema Nov 19, 2022
@Marton6
Marton6 deleted the importer-test-suite branch November 19, 2022 10:34
@florisvdg florisvdg linked an issue Dec 2, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create testing util package in SDK

3 participants