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

Backport of test: Fix bug in TestAddTestPlugin test helper into release/1.13.x #19317

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #19313 to be assessed for backporting due to the inclusion of the label backport/1.13.x.

The below text is copied from the body of the original PR.


This PR fixes a bug in TestAddTestPlugin that appears to only manifest on Linux systems. This bug resulted in the test failing on Mac systems but passing on Linux systems because we failed to properly get the plugin version.

Additionally, we update the test to use the plugin version when performing the Read on the plugin catalog since this should now be properly set.

We write the plugin binary file in TestAddTestPlugin and then call file.Close() in a defer statement. However, we need to read the file's SHA256 sum immediately after writing the file so we call file.Sync(). On Linux this was not working as expected because we seem to be reading the sha sum and running the plugin too fast. This caused the call to get the plugin version to fail and to be incorrectly written to storage as un-versioned.


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/fix-external-plugin-test/nominally-evident-cicada branch from 5b2f609 to ef8d081 Compare February 23, 2023 17:11
@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/fix-external-plugin-test/nominally-evident-cicada branch from f34599d to 49e7120 Compare February 23, 2023 17:11
@fairclothjm fairclothjm merged commit 62eeda8 into release/1.13.x Feb 23, 2023
@fairclothjm fairclothjm deleted the backport/fix-external-plugin-test/nominally-evident-cicada branch January 23, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants