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

Read private ethereum config from env #1151

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

lukaszcl
Copy link
Contributor

@lukaszcl lukaszcl commented Sep 23, 2024


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes introduce support for specifying a private Ethereum execution layer, version, and custom Docker images in the test configuration. This allows for greater flexibility and customization when testing against specific or private Ethereum network setups.

What

  • lib/config/env.go

    • Added constants for new environment variables: E2E_TEST_PRIVATE_ETHEREUM_EXECUTION_LAYER, E2E_TEST_PRIVATE_ETHEREUM_ETHEREUM_VERSION, and E2E_TEST_PRIVATE_ETHEREUM_CUSTOM_DOCKER_IMAGE. This allows these configurations to be set through environment variables.
    • Updated TestConfig.ReadFromEnvVar() to read the new environment variables and set corresponding fields in the TestConfig struct. This enables the configuration of a private Ethereum network's execution layer, version, and custom Docker images for testing.
  • lib/config/testconfig.go

    • Imported the types package to use the ExecutionLayer and EthereumVersion types.
    • Added logic to convert environment variable strings to ExecutionLayer and EthereumVersion types and set them in PrivateEthereumNetwork config. This allows specifying the execution layer and version for a private Ethereum network.
  • lib/docker/test_env/ethereum_env.go

    • Modified the auto-fill logic to consider "auto_fill" as a valid option for ethereumVersion, triggering an attempt to automatically determine the Ethereum version based on the custom Docker image if specified. This enhancement facilitates easier configuration when using custom Ethereum network setups by potentially auto-detecting the correct Ethereum version to use.

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
4.79% Technical Debt Ratio on New Code (required ≤ 4%)

See analysis details on SonarQube

@lukaszcl lukaszcl merged commit 2ba5125 into main Sep 23, 2024
44 checks passed
@lukaszcl lukaszcl deleted the read-private-ethereum-config-from-env branch September 23, 2024 12:40
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