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

Update mercury e2e tests to support new mercury plugin and hmac auth #8683

Merged
merged 52 commits into from
Mar 15, 2023

Conversation

lukaszcl
Copy link
Collaborator

@lukaszcl lukaszcl commented Mar 13, 2023

TODO

  • Update chainlink-env to use infra-chart/mercury-server use this version of chainlink-env here

This updates e2e tests to work with for latest mercury changes:

This requires mercury infra-chart from https://github.com/smartcontractkit/infra-charts/pull/495 (until merged, set it via local chainlink-env). Also, here are latest env vars:

CHAINLINK_IMAGE="795953128386.dkr.ecr.us-west-2.amazonaws.com/chainlink"
CHAINLINK_VERSION="latest.6ce481167fd956bb5fdf0e516684cebb86f55f84"
MERCURY_SERVER_IMAGE="795953128386.dkr.ecr.us-west-2.amazonaws.com/mercury-server"
MERCURY_SERVER_TAG: "sha-5a71f1a-snapshot"
MS_DATABASE_ENCRYPTION_KEY="key",
MS_DATABASE_FIRST_ADMIN_ID="02185d5a-f1ee-40d1-a52a-bf39871b614c",
MS_DATABASE_FIRST_ADMIN_ROLE="admin",
MS_DATABASE_FIRST_ADMIN_KEY="admintestkey",
MS_DATABASE_FIRST_ADMIN_ENCRYPTED_KEY="mz1I4AgYtvo3Wumrgtlyh9VWkCf/IzZ6JROnuw==",

Load tests were updated to use HMAC auth. cc @skudasov

Also, the code was refactored and a new way to re-use existing env and contracts was added. Now, every time when MERCURY_KEEP_ENV=true is set and smoke/mercury_test.go is executed, a config file is created with mercury contracts and credentials to re-use in next execution.

Example logs:

1:00PM INF To reuse this env in next test on chain 420, set:
"MERCURY_ENV_CONFIG_PATH"="/Users/lukasz/Documents/smartcontractkit/chainlink/integration-tests/smoke/logs/d1032aab-d9cc-44d5-a6f4-2e64a0a85110.json"

To reuse the env and contracts in next test, simply set MERCURY_ENV_CONFIG_PATH="/Users/lukasz/Documents/smartcontractkit/chainlink/integration-tests/smoke/logs/d1032aab-d9cc-44d5-a6f4-2e64a0a85110.json

@lukaszcl lukaszcl requested a review from a team as a code owner March 13, 2023 13:35
@lukaszcl
Copy link
Collaborator Author

@anirudhwarrier could you please review again?

@lukaszcl lukaszcl force-pushed the update-mercury-e2e-tests-for-new-plugin-and-hmac branch from 40adf2e to d5867c1 Compare March 15, 2023 01:33
…-plugin-and-hmac' into update-mercury-e2e-tests-for-new-plugin-and-hmac

# Conflicts:
#	integration-tests/load/mercury_test.go
#	integration-tests/smoke/mercury_test.go
#	integration-tests/testsetups/mercury/mercury.go
skudasov
skudasov previously approved these changes Mar 15, 2023
anirudhwarrier
anirudhwarrier previously approved these changes Mar 15, 2023
@skudasov skudasov dismissed stale reviews from anirudhwarrier and themself via 0275560 March 15, 2023 07:16
@skudasov skudasov self-requested a review March 15, 2023 07:25
@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@skudasov skudasov merged commit bc7015e into develop Mar 15, 2023
@skudasov skudasov deleted the update-mercury-e2e-tests-for-new-plugin-and-hmac branch March 15, 2023 07:46
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.

3 participants