Skip to content

Commit 3860740

Browse files
committed
Fix misc tests that were fixed on a different branch, update to use protos from the cap-devs
1 parent b213255 commit 3860740

12 files changed

Lines changed: 137 additions & 174 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ require (
4444
github.com/smartcontractkit/chain-selectors v1.0.89
4545
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10
4646
github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4
47-
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260504161322-7061fbfd5189
47+
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260520192008-ba2a4dc64333
4848
github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b
4949
github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260205130626-db2a2aab956b
5050
github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/capabilities/v2/actions/confidentialhttp/client.pb.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/capabilities/v2/actions/confidentialworkflow/client.pb.go

Lines changed: 88 additions & 139 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/capabilities/v2/chain-capabilities/evm/client.pb.go

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/capabilities/v2/chain-capabilities/solana/client.pb.go

Lines changed: 6 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/capabilities/v2/protoc/pkg/template_generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ func (t *TemplateGenerator) runTemplate(name, tmplText string, args any, partial
265265
return false, err
266266
}
267267
for _, env := range md.AdditionalEnvironments {
268-
if env == generator.AdditionalEnironments_ADDITIONAL_ENVIRONMENTS_TEE {
268+
if env == generator.AdditionalEnvironments_ADDITIONAL_ENVIRONMENTS_TEE {
269269
return true, nil
270270
}
271271
}

pkg/workflows/artifacts/artifacts_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (s *ArtifactsTestSuite) TestArtifacts() {
4747

4848
// Compare the keccak256 hash of the binary data with the keccak256 hash of the
4949
// base64 encoded binary from CRE-CLI
50-
expKeccak256Hash, err := hex.DecodeString("a057a58ff8212122016515b2922b7c3893525f7f5afe95c8442e0cd629d68420")
50+
expKeccak256Hash, err := hex.DecodeString("542c371ba57ebe83b5a5d04e92f058dc2725c9bd3a9d5b2e7119a4b2eb8b700c")
5151
s.NoError(err, "failed to decode expected keccak256 hash")
5252
keccak256FromSha3Lib := sha3.NewLegacyKeccak256()
5353
keccak256FromSha3Lib.Write(b64EncodedBinaryData)
@@ -59,15 +59,15 @@ func (s *ArtifactsTestSuite) TestArtifacts() {
5959

6060
base64EncodedBinaryData := artifacts.GetBinaryData()
6161
// Compare if the compiled WASM binary is the same as the CRE-CLI output
62-
s.Len(base64EncodedBinaryData, 636684, "binary data size should be same as CRE-CLI output")
63-
s.Equal("m1upG3s6AJQvOA8AAK295+EaARsHAADf/YcBgFURwPQAANDq5wFQVVVVVVVVVVVV3ZMQEI7ZtgMAAKqq",
62+
s.Len(base64EncodedBinaryData, 636848, "binary data size should be same as CRE-CLI output")
63+
s.Equal("m+qtG5syABJYnQAAWHW/95AQATYOAAC+fg9vTQEBTA8AANV+HgBVVVVVVVVVVVVV3ZQQEI7ZtgMAgKqq",
6464
string(base64EncodedBinaryData[0:80]))
65-
s.Equal("gUEoFNoVRfyHGTsZmdg7wCJbGVibOhmYmsDAytgg92FTTmiddpI/x8SYzdANBkPGhtLoj/Hn7jvK26YE",
65+
s.Equal("hIAEjIDBYIsW8d9MXI1NnZwh4W0M7cxdDc1NISCl7eFN4ZQ3JNuf5C+mJsxGnhAo0vZkxrYmrFZAykNM",
6666
string(base64EncodedBinaryData[len(base64EncodedBinaryData)-80:]))
6767

6868
s.Equal("myContract: 0x44DD9D24349965E5e20E3D6118F560BCd64828E9\nchainID: 11155111", string(artifacts.GetConfigData()))
6969

70-
s.Equal("004789eee3f5eee474ef64fe8b9251086083ad14af7b9135c9f33b661a128b3e", artifacts.GetWorkflowID())
70+
s.Equal("00b9e4be5dc085980cc99cdd273149f02a2124729bca201e8437d85569959e11", artifacts.GetWorkflowID())
7171
}
7272

7373
func (s *ArtifactsTestSuite) TestArtifactsSadPaths() {

pkg/workflows/host/tee_provider.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ func NewTeeProvider(tpe sdkpb.TeeType, regions []string) func(tee *sdkpb.Tee) bo
1616
}
1717

1818
func (t *teeProvider) Provides(tee *sdkpb.Tee) bool {
19+
if tee == nil {
20+
return true
21+
}
22+
1923
var regions []string
2024
switch teet := tee.Item.(type) {
2125
case *sdkpb.Tee_AnyRegions:
@@ -37,6 +41,8 @@ func (t *teeProvider) Provides(tee *sdkpb.Tee) bool {
3741
if !found {
3842
return false
3943
}
44+
default:
45+
return false
4046
}
4147

4248
if len(regions) == 0 {

pkg/workflows/host/tee_provider_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func TestNewTeeProvider(t *testing.T) {
140140
t.Run("returns false when tee item is nil", func(t *testing.T) {
141141
provides := NewTeeProvider(sdkpb.TeeType_TEE_TYPE_AWS_NITRO, []string{"us-west-2"})
142142
tee := &sdkpb.Tee{}
143-
assert.True(t, provides(tee))
143+
assert.False(t, provides(tee))
144144
})
145145

146146
t.Run("AnyRegions with empty region list returns false", func(t *testing.T) {

0 commit comments

Comments
 (0)