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

Integration test updates #119

Merged
merged 4 commits into from
Nov 15, 2024
Merged

Integration test updates #119

merged 4 commits into from
Nov 15, 2024

Conversation

aka-bo
Copy link
Contributor

@aka-bo aka-bo commented Nov 12, 2024

Modifications

scripts/local-integration-test.sh:

  • Add missing export, TEST_DB_HOSTNAME. This variable is required by the cucumber feature implementation scripts.
  • Execute mysqladmin commands inside the running mysql container, eliminating the client dependency.

integration/node/features/support/encrypt.js:

  • Use the same working directory as decrypt.js (and the integration Asherah integration test suite).

integration/node/features/support/decrypt.js:

  • Use TEST_DB_HOSTNAME env variable for consistency (replaced hardcoded "localhost").

integration/node (package):

  • Install asherah as a linked folder.

- add missing export: TEST_DB_HOSTNAME
- execute mysqladmin commands inside the running mysql container

const fileDirectory = os.tmpdir() + "/";
const fileDirectory = "/tmp/";
Copy link
Collaborator

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the working directory for all cross-language tests in the suite. For example, asherah-go encrypts a test payload and writes it to a file in /tmp which is then loaded and decrypted by the asherah-node package (and vice versa).

As it is now, asherah-node's encryption output is not found by the downstream tests in this expected location, resulting in the errors described in #120

See:
asherah-node decrypt:

const fileDirectory = "/tmp/";

asherah-go: https://github.com/godaddy/asherah/blob/main/tests/cross-language/go/const.go#L10

@aka-bo aka-bo merged commit 5d5c669 into main Nov 15, 2024
2 checks passed
@aka-bo aka-bo deleted the integration-test-updates branch November 15, 2024 16:42
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.

2 participants