From 6c443d47964bc74ccfe10098504249a70cd5edf2 Mon Sep 17 00:00:00 2001 From: connorwstein Date: Fri, 6 Dec 2024 10:42:19 -0500 Subject: [PATCH] Couple smoke tests --- deployment/ccip/changeset/state_test.go | 24 +++++++++++++++++++ deployment/ccip/changeset/view_test.go | 22 +++++++++++++++++ .../view/v1_0/static_link_token_test.go | 3 ++- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 deployment/ccip/changeset/state_test.go create mode 100644 deployment/ccip/changeset/view_test.go diff --git a/deployment/ccip/changeset/state_test.go b/deployment/ccip/changeset/state_test.go new file mode 100644 index 00000000000..6e679c265dc --- /dev/null +++ b/deployment/ccip/changeset/state_test.go @@ -0,0 +1,24 @@ +package changeset + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/deployment/environment/memory" + "github.com/smartcontractkit/chainlink/v2/core/logger" +) + +func TestSmokeState(t *testing.T) { + lggr := logger.TestLogger(t) + tenv := NewMemoryEnvironmentWithJobsAndContracts(t, lggr, memory.MemoryEnvironmentConfig{ + Chains: 3, + Nodes: 4, + Bootstraps: 1, + NumOfUsersPerChain: 1, + }, nil) + state, err := LoadOnchainState(tenv.Env) + require.NoError(t, err) + _, err = state.View(tenv.Env.AllChainSelectors()) + require.NoError(t, err) +} diff --git a/deployment/ccip/changeset/view_test.go b/deployment/ccip/changeset/view_test.go new file mode 100644 index 00000000000..934b937f7b5 --- /dev/null +++ b/deployment/ccip/changeset/view_test.go @@ -0,0 +1,22 @@ +package changeset + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/deployment/environment/memory" + "github.com/smartcontractkit/chainlink/v2/core/logger" +) + +func TestSmokeView(t *testing.T) { + lggr := logger.TestLogger(t) + tenv := NewMemoryEnvironmentWithJobsAndContracts(t, lggr, memory.MemoryEnvironmentConfig{ + Chains: 3, + Nodes: 4, + Bootstraps: 1, + NumOfUsersPerChain: 1, + }, nil) + _, err := ViewCCIP(tenv.Env) + require.NoError(t, err) +} diff --git a/deployment/common/view/v1_0/static_link_token_test.go b/deployment/common/view/v1_0/static_link_token_test.go index 479f91ed4f0..517efac9438 100644 --- a/deployment/common/view/v1_0/static_link_token_test.go +++ b/deployment/common/view/v1_0/static_link_token_test.go @@ -3,6 +3,7 @@ package v1_0 import ( "testing" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" @@ -24,7 +25,7 @@ func TestStaticLinkTokenView(t *testing.T) { v, err := GenerateStaticLinkTokenView(lt) require.NoError(t, err) - assert.Equal(t, v.Owner, chain.DeployerKey.From) + assert.Equal(t, v.Owner, common.HexToAddress("0x0")) // Ownerless assert.Equal(t, v.TypeAndVersion, "StaticLinkToken 1.0.0") assert.Equal(t, v.Decimals, uint8(18)) assert.Equal(t, v.Supply.String(), "1000000000000000000000000000")