Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

dev: enforce katana in make test-end-to-end #1106

Merged

Conversation

jaipaljadeja
Copy link
Contributor

@jaipaljadeja jaipaljadeja commented Apr 16, 2024

Time spent on this PR: 45 -50 mins

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

from .env file, the variable STARKNET_NETWORK is used to both:

  • decide on which network to deploy kakarot
  • decide on which network to run the integration tests

Resolves #1100

What is the new behavior?

  • make test-end-to-end forces STARKNET_NETWORK to be katana

This change is Reviewable

Copy link
Member

@ClementWalter ClementWalter left a comment

Choose a reason for hiding this comment

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

see strategy update in the issue

Copy link
Member

@ClementWalter ClementWalter left a comment

Choose a reason for hiding this comment

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

if os.getenv("STARKNET_NETWORK") is not None:
    if NETWORKS.get(os.environ["STARKNET_NETWORK"]) is not None:
        NETWORK = NETWORKS[os.environ["STARKNET_NETWORK"]]
    else:
        raise ValueError(
            f"STARKNET_NETWORK {os.environ['STARKNET_NETWORK']} given in env variable unknown"
        )
elif os.getenv("RPC_URL") is not None:
    NETWORK = {
        "name": os.getenv("RPC_NAME", "custom-rpc"),
        "rpc_url": os.getenv("RPC_URL"),
        "explorer_url": "",
        "devnet": False,
        "check_interval": float(os.getenv("CHECK_INTERVAL", 0.1)),
        "max_wait": float(os.getenv("MAX_WAIT", 30)),
    }
else:
    NETWORK = NETWORKS["katana"]

@ClementWalter ClementWalter merged commit a041778 into kkrt-labs:main Apr 19, 2024
6 checks passed
matthieuauger pushed a commit to matthieuauger/kakarot that referenced this pull request Nov 9, 2024
* clean clippy

* uninlined_format_args

* doc_markdown

* doc_markdown

* cleanup

* unreadable_literal

* unreadable_literal

* clean up

* fmt

* clean up

* fix clippy

* fix

* fix

* fix

* fix comment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants