Skip to content

Commit

Permalink
Couple smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
connorwstein committed Dec 6, 2024
1 parent 4f50f4d commit 6c443d4
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
24 changes: 24 additions & 0 deletions deployment/ccip/changeset/state_test.go
Original file line number Diff line number Diff line change
@@ -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)
}
22 changes: 22 additions & 0 deletions deployment/ccip/changeset/view_test.go
Original file line number Diff line number Diff line change
@@ -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)
}
3 changes: 2 additions & 1 deletion deployment/common/view/v1_0/static_link_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
Expand Down

0 comments on commit 6c443d4

Please sign in to comment.