Skip to content

Commit

Permalink
Use new Havoc lib from CTF (#14201)
Browse files Browse the repository at this point in the history
* deps conflict, not building

* update havoc dep

* update deps again

* update deps to tagged CTF version

* update core OCR chaos test

* update go.mod

* fix lint
  • Loading branch information
skudasov authored Aug 22, 2024
1 parent 9c240b6 commit 2521c4b
Show file tree
Hide file tree
Showing 8 changed files with 261 additions and 170 deletions.
11 changes: 6 additions & 5 deletions integration-tests/crib/chaos.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ import (
"time"

"github.com/chaos-mesh/chaos-mesh/api/v1alpha1"
"github.com/smartcontractkit/havoc/k8schaos"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/smartcontractkit/chainlink-testing-framework/havoc"
)

func rebootCLNamespace(delay time.Duration, namespace string) (*k8schaos.Chaos, error) {
k8sClient, err := k8schaos.NewChaosMeshClient()
func rebootCLNamespace(delay time.Duration, namespace string) (*havoc.Chaos, error) {
k8sClient, err := havoc.NewChaosMeshClient()
if err != nil {
return nil, err
}
return k8schaos.NewChaos(k8schaos.ChaosOpts{
return havoc.NewChaos(havoc.ChaosOpts{
Description: "Reboot CRIB",
DelayCreate: delay,
Object: &v1alpha1.PodChaos{
Expand All @@ -40,6 +41,6 @@ func rebootCLNamespace(delay time.Duration, namespace string) (*k8schaos.Chaos,
},
},
Client: k8sClient,
Logger: &k8schaos.Logger,
Logger: &havoc.Logger,
})
}
4 changes: 2 additions & 2 deletions integration-tests/crib/ocr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/smartcontractkit/havoc/k8schaos"
"github.com/smartcontractkit/chainlink-testing-framework/havoc"

"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -40,7 +40,7 @@ func TestCRIB(t *testing.T) {
os.Getenv("CRIB_NAMESPACE"),
)
ch.Create(context.Background())
ch.AddListener(k8schaos.NewChaosLogger(l))
ch.AddListener(havoc.NewChaosLogger(l))
t.Cleanup(func() {
err := ch.Delete(context.Background())
require.NoError(t, err)
Expand Down
67 changes: 41 additions & 26 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/avast/retry-go/v4 v4.6.0
github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df
github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240709130330-9f4feec7553f
github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240821051457-da69c6d9617a
github.com/cli/go-gh/v2 v2.0.0
github.com/ethereum/go-ethereum v1.13.8
github.com/fxamacker/cbor/v2 v2.6.0
github.com/fxamacker/cbor/v2 v2.7.0
github.com/go-resty/resty/v2 v2.11.0
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
Expand All @@ -26,22 +26,22 @@ require (
github.com/pelletier/go-toml/v2 v2.2.2
github.com/pkg/errors v0.9.1
github.com/prometheus/common v0.55.0
github.com/rs/zerolog v1.31.0
github.com/rs/zerolog v1.33.0
github.com/scylladb/go-reflectx v1.0.1
github.com/segmentio/ksuid v1.0.4
github.com/shopspring/decimal v1.4.0
github.com/slack-go/slack v0.12.2
github.com/smartcontractkit/chain-selectors v1.0.21
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240821145706-0dd95151c097
github.com/smartcontractkit/chainlink-testing-framework v1.34.5
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239
github.com/smartcontractkit/chainlink-testing-framework v1.34.6
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.1
github.com/smartcontractkit/chainlink-testing-framework/havoc v0.0.0-20240822140612-df8e03c10dc1
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37
github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7
github.com/smartcontractkit/seth v1.1.2
github.com/smartcontractkit/wasp v0.4.5
github.com/spf13/cobra v1.8.0
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
github.com/test-go/testify v1.1.4
github.com/testcontainers/testcontainers-go v0.28.0
Expand All @@ -54,7 +54,7 @@ require (
golang.org/x/sync v0.8.0
golang.org/x/text v0.17.0
gopkg.in/guregu/null.v4 v4.0.0
k8s.io/apimachinery v0.28.2
k8s.io/apimachinery v0.31.0
)

// avoids ambigious imports of indirect dependencies
Expand Down Expand Up @@ -97,13 +97,28 @@ require (
github.com/avast/retry-go v3.0.0+incompatible // indirect
github.com/awalterschulze/gographviz v2.0.3+incompatible // indirect
github.com/aws/aws-sdk-go v1.45.25 // indirect
github.com/aws/aws-sdk-go-v2 v1.30.4 // indirect
github.com/aws/aws-sdk-go-v2/config v1.27.28 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.28 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.16 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.18 // indirect
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.22.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.30.4 // indirect
github.com/aws/constructs-go/constructs/v10 v10.1.255 // indirect
github.com/aws/jsii-runtime-go v1.75.0 // indirect
github.com/aws/smithy-go v1.20.4 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
Expand Down Expand Up @@ -168,15 +183,13 @@ require (
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/esote/minmaxheap v1.0.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fvbommel/sortorder v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gagliardetto/binary v0.7.7 // indirect
github.com/gagliardetto/solana-go v1.8.4 // indirect
Expand Down Expand Up @@ -229,7 +242,7 @@ require (
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/go-tpm v0.9.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/gorilla/context v1.1.1 // indirect
Expand Down Expand Up @@ -343,6 +356,7 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/mwitkow/grpc-proxy v0.0.0-20230212185441-f345521cb9c9 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
Expand Down Expand Up @@ -428,10 +442,10 @@ require (
github.com/zondax/ledger-go v0.14.1 // indirect
go.dedis.ch/fixbuf v1.0.3 // indirect
go.dedis.ch/kyber/v3 v3.1.0 // indirect
go.etcd.io/bbolt v1.3.8 // indirect
go.etcd.io/etcd/api/v3 v3.5.10 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect
go.etcd.io/etcd/client/v3 v3.5.10 // indirect
go.etcd.io/bbolt v1.3.9 // indirect
go.etcd.io/etcd/api/v3 v3.5.14 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect
go.etcd.io/etcd/client/v3 v3.5.14 // indirect
go.mongodb.org/mongo-driver v1.15.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 // indirect
Expand Down Expand Up @@ -464,27 +478,28 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.28.2 // indirect
k8s.io/apiextensions-apiserver v0.28.2 // indirect
k8s.io/cli-runtime v0.28.2 // indirect
k8s.io/client-go v0.28.2 // indirect
k8s.io/component-base v0.28.2 // indirect
k8s.io/api v0.31.0 // indirect
k8s.io/apiextensions-apiserver v0.31.0 // indirect
k8s.io/cli-runtime v0.31.0 // indirect
k8s.io/client-go v0.31.0 // indirect
k8s.io/component-base v0.31.0 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f // indirect
k8s.io/kubectl v0.28.2 // indirect
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
k8s.io/kubectl v0.31.0 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
nhooyr.io/websocket v1.8.7 // indirect
pgregory.net/rapid v0.5.5 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
sigs.k8s.io/controller-runtime v0.16.2 // indirect
sigs.k8s.io/controller-runtime v0.19.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/kustomize/api v0.17.2 // indirect
sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Expand Down
Loading

0 comments on commit 2521c4b

Please sign in to comment.