From 9864099fd88c730943655479eeb115b37cfb603e Mon Sep 17 00:00:00 2001 From: HenryNguyen5 <6404866+HenryNguyen5@users.noreply.github.com> Date: Fri, 25 Oct 2024 09:27:28 -0700 Subject: [PATCH] Formatting --- core/scripts/keystone/src/01_deploy_contracts_cmd.go | 2 +- core/scripts/keystone/src/02_deploy_jobspecs_cmd.go | 2 +- .../src/03_deploy_streams_trigger_cmd_test.go | 3 +-- core/scripts/keystone/src/88_gen_jobspecs.go | 2 +- core/scripts/keystone/src/88_gen_jobspecs_test.go | 2 +- core/scripts/keystone/src/99_files.go | 10 +++++----- core/scripts/keystone/src/99_k8s_client.go | 12 ++++++------ 7 files changed, 16 insertions(+), 17 deletions(-) diff --git a/core/scripts/keystone/src/01_deploy_contracts_cmd.go b/core/scripts/keystone/src/01_deploy_contracts_cmd.go index 2f8357d6c77..d322af3b451 100644 --- a/core/scripts/keystone/src/01_deploy_contracts_cmd.go +++ b/core/scripts/keystone/src/01_deploy_contracts_cmd.go @@ -80,7 +80,7 @@ func (g *deployContracts) Run(args []string) { os.Setenv("ETH_CHAIN_ID", fmt.Sprintf("%d", *chainID)) os.Setenv("ACCOUNT_KEY", *accountKey) os.Setenv("INSECURE_SKIP_VERIFY", "true") - deploy( *nodeSetsPath, *ocrConfigFile, *skipFunding, *dryRun, *onlySetConfig, *artefactsDir, *nodeSetSize) + deploy(*nodeSetsPath, *ocrConfigFile, *skipFunding, *dryRun, *onlySetConfig, *artefactsDir, *nodeSetSize) } // deploy does the following: diff --git a/core/scripts/keystone/src/02_deploy_jobspecs_cmd.go b/core/scripts/keystone/src/02_deploy_jobspecs_cmd.go index 688e4d073d3..cfa71f0022f 100644 --- a/core/scripts/keystone/src/02_deploy_jobspecs_cmd.go +++ b/core/scripts/keystone/src/02_deploy_jobspecs_cmd.go @@ -55,7 +55,7 @@ func (g *deployJobSpecs) Run(args []string) { deployedContracts, err := LoadDeployedContracts(*artefactsDir) PanicErr(err) - jobspecs := genSpecs( + jobspecs := generateOCR3JobSpecs( *nodeSetsPath, *templatesLocation, *chainID, *p2pPort, deployedContracts.OCRContract.Hex(), diff --git a/core/scripts/keystone/src/03_deploy_streams_trigger_cmd_test.go b/core/scripts/keystone/src/03_deploy_streams_trigger_cmd_test.go index 8f804a3ebf3..7aa9970971d 100644 --- a/core/scripts/keystone/src/03_deploy_streams_trigger_cmd_test.go +++ b/core/scripts/keystone/src/03_deploy_streams_trigger_cmd_test.go @@ -45,7 +45,7 @@ func TestCreateMercuryV3Job(t *testing.T) { func TestCreateMercuryBootstrapJob(t *testing.T) { jobConfigData := MercuryV3BootstrapJobSpecData{ - FeedName: feedName, + FeedName: feedName, FeedID: feedID, ChainID: chainID, VerifierAddress: verifierAddress, @@ -68,4 +68,3 @@ func TestCreateKeystoneWorkflowJob(t *testing.T) { snaps.MatchSnapshot(t, output) } - diff --git a/core/scripts/keystone/src/88_gen_jobspecs.go b/core/scripts/keystone/src/88_gen_jobspecs.go index 3009b6bcac6..ae27a04e877 100644 --- a/core/scripts/keystone/src/88_gen_jobspecs.go +++ b/core/scripts/keystone/src/88_gen_jobspecs.go @@ -26,7 +26,7 @@ type donHostSpec struct { oracles []hostSpec } -func genSpecs( +func generateOCR3JobSpecs( nodeSetsPath string, templatesDir string, chainID int64, diff --git a/core/scripts/keystone/src/88_gen_jobspecs_test.go b/core/scripts/keystone/src/88_gen_jobspecs_test.go index 1f76e9692c7..a4524e98f48 100644 --- a/core/scripts/keystone/src/88_gen_jobspecs_test.go +++ b/core/scripts/keystone/src/88_gen_jobspecs_test.go @@ -31,6 +31,6 @@ func TestGenSpecs(t *testing.T) { p2pPort := int64(6690) contractAddress := "0xB29934624cAe3765E33115A9530a13f5aEC7fa8A" - specs := genSpecs(nodeSetsPath, "../templates", chainID, p2pPort, contractAddress, 4) + specs := generateOCR3JobSpecs(nodeSetsPath, "../templates", chainID, p2pPort, contractAddress, 4) snaps.MatchSnapshot(t, specs.ToString()) } diff --git a/core/scripts/keystone/src/99_files.go b/core/scripts/keystone/src/99_files.go index 8a0b4161c8e..b9d8f0387fb 100644 --- a/core/scripts/keystone/src/99_files.go +++ b/core/scripts/keystone/src/99_files.go @@ -11,11 +11,11 @@ import ( ) const ( - defaultArtefactsDir = "artefacts" - defaultNodeSetsPath = ".cache/node_sets.json" - deployedContractsJSON = "deployed_contracts.json" - bootstrapSpecTemplate = "bootstrap.toml" - oracleSpecTemplate = "oracle.toml" + defaultArtefactsDir = "artefacts" + defaultNodeSetsPath = ".cache/node_sets.json" + deployedContractsJSON = "deployed_contracts.json" + bootstrapSpecTemplate = "bootstrap.toml" + oracleSpecTemplate = "oracle.toml" ) func writeLines(lines []string, path string) error { diff --git a/core/scripts/keystone/src/99_k8s_client.go b/core/scripts/keystone/src/99_k8s_client.go index 518d15abb67..4844b88edba 100644 --- a/core/scripts/keystone/src/99_k8s_client.go +++ b/core/scripts/keystone/src/99_k8s_client.go @@ -66,9 +66,9 @@ func MustNewK8sClient() *K8sClient { type DeploymentWithConfigMap struct { apps.Deployment - ServiceName string - ConfigMap v1.ConfigMap - Host string + ServiceName string + ConfigMap v1.ConfigMap + Host string } func (m *K8sClient) GetDeploymentsWithConfigMap() ([]DeploymentWithConfigMap, error) { @@ -117,10 +117,10 @@ func (m *K8sClient) GetDeploymentsWithConfigMap() ([]DeploymentWithConfigMap, er } deploymentWithConfigMap := DeploymentWithConfigMap{ - Host: host, + Host: host, ServiceName: serviceName, - Deployment: deployment, - ConfigMap: *cm, + Deployment: deployment, + ConfigMap: *cm, } deploymentsWithConfigMaps = append(deploymentsWithConfigMaps, deploymentWithConfigMap) }