Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some proper integration tests #19

Open
joshuadavidthomas opened this issue May 14, 2024 · 3 comments
Open

Add some proper integration tests #19

joshuadavidthomas opened this issue May 14, 2024 · 3 comments
Labels
🧁 needs baking Requires more time for consideration or development before further action 💅 nice to have Desirable enhancements that are not critical to the project ⚠️ security Critical security vulnerabilities that require immediate attention 🧪 tests Issues or tasks related to writing or improving tests

Comments

@joshuadavidthomas
Copy link
Member

joshuadavidthomas commented May 14, 2024

There's a little too much mocking for my liking in the test suite, but it seemed like the quickest way to test the library's functionality. I'd really like to add some actual integration tests that use a real 1Password vault.

I think the right idea would be to throw it behind a pytest mark that is skipped automatically. Then dedicate a whole 1Password vault for the tests, with the ability to automatically load some secrets (via a pytest fixture?) at the start of the test run that could then be used through out the run.

I would also want to use a service account that only had access to that single test vault.

@joshuadavidthomas joshuadavidthomas added ⚠️ security Critical security vulnerabilities that require immediate attention 💅 nice to have Desirable enhancements that are not critical to the project 🧁 needs baking Requires more time for consideration or development before further action 🧪 tests Issues or tasks related to writing or improving tests labels May 14, 2024
@joshuadavidthomas
Copy link
Member Author

joshuadavidthomas commented May 14, 2024

Only thing that makes me hesitate is which 1Password account to use in CI? Locally I could have setup instructions for anyone to follow.

I imagine I could just use my company's account, but what happens if for whatever reason I no longer have access to it?

@joshuadavidthomas
Copy link
Member Author

Can a free account access service accounts and/or Connect servers (#16)?

@joshuadavidthomas
Copy link
Member Author

There is this: https://github.com/1Password/for-open-source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧁 needs baking Requires more time for consideration or development before further action 💅 nice to have Desirable enhancements that are not critical to the project ⚠️ security Critical security vulnerabilities that require immediate attention 🧪 tests Issues or tasks related to writing or improving tests
Projects
None yet
Development

No branches or pull requests

1 participant