Skip to content

Commit

Permalink
in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghestrimtu committed Mar 7, 2022
1 parent 04b8abe commit 357e359
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/chaos/chaos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var _ = Describe("Terra chaos suite", func() {
By("Deploying OCRv2 cluster", func() {
state.DeployCluster(5, true)
state.LabelChaosGroups()
state.ImitateSource(common.SourceChangeInterval, 2, 10)
state.SetAllAdapterResponsesToTheSameValue(2)
})
})
It("Can tolerate chaos experiments", func() {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/migration/ocr2_spec_migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var _ = Describe("Terra OCRv2 @ocr-spec-migration", func() {
Fail("Provide CHAINLINK_VERSION_TO variable: a version on which we migrate")
}
state.DeployCluster(nodes, true)
state.ImitateSource(1*time.Second, 2, 10)
state.SetAllAdapterResponsesToTheSameValue(2)
})
})

Expand Down
11 changes: 0 additions & 11 deletions tests/e2e/smoke/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,6 @@ func (m *OCRv2State) SetAllAdapterResponsesToDifferentValues(responses []int) {
}
}

func (m *OCRv2State) ImitateSource(changeInterval time.Duration, min int, max int) {
go func() {
for {
m.SetAllAdapterResponsesToTheSameValue(min)
time.Sleep(changeInterval)
m.SetAllAdapterResponsesToTheSameValue(max)
time.Sleep(changeInterval)
}
}()
}

// CreateJobs creating OCR jobs and EA stubs
func (m *OCRv2State) CreateJobs() {
m.SetAllAdapterResponsesToTheSameValue(5)
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/smoke/ocr2_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/smartcontractkit/chainlink-terra/tests/e2e"
"github.com/smartcontractkit/chainlink-terra/tests/e2e/common"
tc "github.com/smartcontractkit/chainlink-terra/tests/e2e/smoke/common"
"github.com/smartcontractkit/integrations-framework/actions"
)
Expand All @@ -18,7 +17,7 @@ var _ = Describe("Terra OCRv2 Proxy @ocr_proxy", func() {
state = &tc.OCRv2State{}
By("Deploying the cluster", func() {
state.DeployCluster(5, false)
common.ImitateSource(state.MockServer, 1*time.Second, 2, 10)
state.SetAllAdapterResponsesToTheSameValue(2)
})
})

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/smoke/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var _ = Describe("Terra OCRv2 @ocr2", func() {
state = &tc.OCRv2State{}
By("Deploying the cluster", func() {
state.DeployCluster(5, false)
state.ImitateSource(1*time.Second, 2, 10)
state.SetAllAdapterResponsesToTheSameValue(2)
})
})

Expand Down

0 comments on commit 357e359

Please sign in to comment.