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 an integration test helper to assert that no pods restart during the test. #296

Closed
mattmoyer opened this issue Dec 17, 2020 · 1 comment · Fixed by #325
Closed

Add an integration test helper to assert that no pods restart during the test. #296

mattmoyer opened this issue Dec 17, 2020 · 1 comment · Fixed by #325
Assignees
Labels
chore Not a bug or an enhancement, but still a work item state/accepted All done!

Comments

@mattmoyer
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Occasionally, there could be a bug in the Pinniped supervisor or concierge servers which is triggered by the integration test suite and causes the affected pod to crash and be restarted by Kubernetes. This can lead to situations where we don't notice a bug because Kubernetes very helpfully restarts the container and our tests tolerate some eventual consistency (e.g., using require.Eventually() assertions).

Describe the solution you'd like
We should have some test assertion helper that checks on the Pinniped pods before and after each test to validate that they have not been restarted. This is similar to the library.DumpLogs() helper we have already, and should be a straightforward extension of that code.

Describe alternatives you've considered
We could deploy our code under test in pods with restartPolicy: Never, but we'd need to significantly refactor the deployment YAML.

Are you considering submitting a PR for this feature?

Not immediately, please leave a comment if you'd like to take a shot at this.

  • How will this project improvement be tested?

    It's test code, so we can probably just do some manual testing (e.g., insert a panic() into the supervisor code and make sure the tests fail).

  • How does this change the current architecture?

    This is a minor change.

  • How will this change be backwards compatible?

    This is a minor change to tests, no backwards compatibility concerns.

  • How will this feature be documented?

    No documentation needed.

@ankeesler
Copy link
Contributor

PR here: #325.

@pinniped-ci-bot pinniped-ci-bot added priority/backlog Prioritized for an upcoming iteration chore Not a bug or an enhancement, but still a work item and removed enhancement New feature or request labels Feb 4, 2021
@pinniped-ci-bot pinniped-ci-bot added the state/started Someone is working on it currently label Feb 4, 2021
@pinniped-ci-bot pinniped-ci-bot added state/accepted All done! and removed priority/backlog Prioritized for an upcoming iteration state/started Someone is working on it currently labels Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Not a bug or an enhancement, but still a work item state/accepted All done!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants