internal

package
v0.0.0-...-692deea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodeCountFlag = "node-count"
View Source
var StartNodesCmd = &cobra.Command{
	Use:   "start-nodes",
	Short: "Start Chainlink nodes",
	RunE: func(cmd *cobra.Command, _ []string) error {
		nodeCount, err := cmd.Flags().GetInt(NodeCountFlag)
		if err != nil {
			return err
		}

		log.Logger = logging.GetLogger(nil, "CORE_DOCKER_ENV_LOG_LEVEL")
		log.Info().Msg("Starting docker test env with Chainlink nodes..")

		config, err := testconfig.GetConfig("Smoke", testconfig.OCR2)
		if err != nil {
			return err
		}

		ethBuilder := ctf_test_env.NewEthereumNetworkBuilder()
		network, err := ethBuilder.
			WithExistingConfig(*config.GetPrivateEthereumNetworkConfig()).
			Build()
		if err != nil {
			return err
		}

		_, err = test_env.NewCLTestEnvBuilder().
			WithTestConfig(&config).
			WithPrivateEthereumNetwork(network.EthereumNetworkConfig).
			WithMockAdapter().
			WithCLNodes(nodeCount).
			WithoutCleanup().
			Build()
		if err != nil {
			return err
		}

		log.Info().Msg("Test env is ready")

		handleExitSignal()

		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL