Skip to content

Commit

Permalink
Fix logging stack events logic (#6649)
Browse files Browse the repository at this point in the history
  • Loading branch information
TiberiuGC committed May 29, 2023
1 parent aa4e3b4 commit 6214467
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
11 changes: 3 additions & 8 deletions integration/tests/inferentia/inferentia_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import (
)

var (
defaultCluster string
noInstallCluster string
params *tests.Params
clusterWithNeuronPlugin string
clusterWithoutPlugin string
Expand All @@ -35,8 +33,8 @@ func init() {
// Call testing.Init() prior to tests.NewParams(), as otherwise -test.* will not be recognised. See also: https://golang.org/doc/go1.13#testing
testing.Init()
params = tests.NewParams("inf1")
defaultCluster = params.ClusterName
noInstallCluster = params.NewClusterName("inf1-no-plugin")
clusterWithNeuronPlugin = params.ClusterName
clusterWithoutPlugin = params.NewClusterName("inf1-no-plugin")
}

func TestInferentia(t *testing.T) {
Expand All @@ -54,9 +52,6 @@ var _ = BeforeSuite(func() {
params.KubeconfigTemp = true
}

clusterWithoutPlugin = noInstallCluster
clusterWithNeuronPlugin = defaultCluster

if !params.SkipCreate {
cmd := params.EksctlCreateCmd.WithArgs(
"cluster",
Expand Down Expand Up @@ -137,7 +132,7 @@ var _ = Describe("(Integration) Inferentia nodes", func() {
})

When("adding an unmanaged nodegroup by default", func() {
params.LogStacksEventsOnFailure()
params.LogStacksEventsOnFailureForCluster(clusterWithoutPlugin)
It("should install without error", func() {
cmd := params.EksctlCreateCmd.WithArgs(
"nodegroup",
Expand Down
9 changes: 2 additions & 7 deletions integration/tests/trainium/trainium_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ import (
)

var (
defaultCluster string
noInstallCluster string
params *tests.Params
clusterWithNeuronPlugin string
clusterWithoutPlugin string
Expand All @@ -43,8 +41,8 @@ func init() {
// Call testing.Init() prior to tests.NewParams(), as otherwise -test.* will not be recognised. See also: https://golang.org/doc/go1.13#testing
testing.Init()
params = tests.NewParams("trn1")
defaultCluster = params.ClusterName
noInstallCluster = params.NewClusterName("trn1-no-plugin")
clusterWithNeuronPlugin = params.ClusterName
clusterWithoutPlugin = params.NewClusterName("trn1-no-plugin")
}

func TestTrainium(t *testing.T) {
Expand All @@ -62,9 +60,6 @@ var _ = BeforeSuite(func() {
params.KubeconfigTemp = true
}

clusterWithoutPlugin = noInstallCluster
clusterWithNeuronPlugin = defaultCluster

if !params.SkipCreate {
cfg := NewConfig(params.Region)
ctx := context.Background()
Expand Down

0 comments on commit 6214467

Please sign in to comment.