Skip to content

Commit

Permalink
Triage really long logs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon committed Dec 13, 2023
1 parent e9f7824 commit 20d8b16
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 205 deletions.
1 change: 1 addition & 0 deletions .github/workflows/k8s-e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: (k8s package) E2E tests
on:
pull_request:
workflow_dispatch:

concurrency:
group: e2e-tests-k8s-${{ github.ref }}
Expand Down
22 changes: 22 additions & 0 deletions k8s/e2e/common/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"github.com/smartcontractkit/chainlink-testing-framework/k8s/environment"
"github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink"
"github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum"
"github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/mockserver"
mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/mockserver-cfg"
"github.com/smartcontractkit/chainlink-testing-framework/k8s/presets"
"github.com/smartcontractkit/chainlink-testing-framework/logging"
"github.com/smartcontractkit/chainlink-testing-framework/utils/ptr"
Expand Down Expand Up @@ -446,3 +448,23 @@ func TestRunTimeout(t *testing.T) {
err = e.Run()
require.Error(t, err)
}

func TestReallyLongLogs(t *testing.T) {
t.Parallel()
l := logging.GetTestLogger(t)
testEnvConfig := GetTestEnvConfig(t)
env := environment.New(testEnvConfig).
AddHelm(mockservercfg.New(nil)).
AddHelm(mockserver.New(nil))
err := env.Run()
require.NoError(t, err)
if env.WillUseRemoteRunner() {
return
}
s := ""
for i := 0; i < 1000; i++ {
s = fmt.Sprintf("%s%s", s, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
l.Info().Int("count", len(s)).Msg("total characters")
l.Info().Str("string", s).Msg("string")
}
}
101 changes: 52 additions & 49 deletions k8s/e2e/local-runner/envs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,74 @@ package env_test
import (
"testing"

"github.com/smartcontractkit/chainlink-testing-framework/k8s/config"
"github.com/smartcontractkit/chainlink-testing-framework/k8s/e2e/common"
)

func TestMultiStageMultiManifestConnection(t *testing.T) {
common.TestMultiStageMultiManifestConnection(t)
}
// func TestMultiStageMultiManifestConnection(t *testing.T) {
// common.TestMultiStageMultiManifestConnection(t)
// }

func TestConnectWithoutManifest(t *testing.T) {
common.TestConnectWithoutManifest(t)
}
// func TestConnectWithoutManifest(t *testing.T) {
// common.TestConnectWithoutManifest(t)
// }

func Test5NodesSoakEnvironmentWithPVCs(t *testing.T) {
common.Test5NodesSoakEnvironmentWithPVCs(t)
}
// func Test5NodesSoakEnvironmentWithPVCs(t *testing.T) {
// common.Test5NodesSoakEnvironmentWithPVCs(t)
// }

func TestWithSingleNodeEnv(t *testing.T) {
common.TestWithSingleNodeEnvParallel(t)
}
// func TestWithSingleNodeEnv(t *testing.T) {
// common.TestWithSingleNodeEnvParallel(t)
// }

func TestWithSingleNodeEnvLocalCharts(t *testing.T) {
t.Setenv(config.EnvVarLocalCharts, "true")
common.TestWithSingleNodeEnv(t)
}
// func TestWithSingleNodeEnvLocalCharts(t *testing.T) {
// t.Setenv(config.EnvVarLocalCharts, "true")
// common.TestWithSingleNodeEnv(t)
// }

func TestMultipleNodeWithDiffDBVersionEnv(t *testing.T) {
common.TestMultipleNodeWithDiffDBVersionEnv(t)
}
// func TestMultipleNodeWithDiffDBVersionEnv(t *testing.T) {
// common.TestMultipleNodeWithDiffDBVersionEnv(t)
// }

func TestMinResources5NodesEnv(t *testing.T) {
common.TestMinResources5NodesEnv(t)
}
// func TestMinResources5NodesEnv(t *testing.T) {
// common.TestMinResources5NodesEnv(t)
// }

func TestMinResources5NodesEnvWithBlockscout(t *testing.T) {
common.TestMinResources5NodesEnvWithBlockscout(t)
}
// func TestMinResources5NodesEnvWithBlockscout(t *testing.T) {
// common.TestMinResources5NodesEnvWithBlockscout(t)
// }

func TestMultipleInstancesOfTheSameType(t *testing.T) {
common.TestMultipleInstancesOfTheSameType(t)
}
// func TestMultipleInstancesOfTheSameType(t *testing.T) {
// common.TestMultipleInstancesOfTheSameType(t)
// }

func Test5NodesPlus2MiningGethsReorgEnv(t *testing.T) {
common.Test5NodesPlus2MiningGethsReorgEnv(t)
}
// func Test5NodesPlus2MiningGethsReorgEnv(t *testing.T) {
// common.Test5NodesPlus2MiningGethsReorgEnv(t)
// }

func TestWithChaos(t *testing.T) {
common.TestWithChaos(t)
}
// func TestWithChaos(t *testing.T) {
// common.TestWithChaos(t)
// }

func TestEmptyEnvironmentStartup(t *testing.T) {
common.TestEmptyEnvironmentStartup(t)
}
// func TestEmptyEnvironmentStartup(t *testing.T) {
// common.TestEmptyEnvironmentStartup(t)
// }

func TestRolloutRestartUpdate(t *testing.T) {
common.TestRolloutRestart(t, true)
}
// func TestRolloutRestartUpdate(t *testing.T) {
// common.TestRolloutRestart(t, true)
// }

func TestRolloutRestartBySelector(t *testing.T) {
common.TestRolloutRestart(t, false)
}
// func TestRolloutRestartBySelector(t *testing.T) {
// common.TestRolloutRestart(t, false)
// }

func TestReplaceHelm(t *testing.T) {
common.TestReplaceHelm(t)
}
// func TestReplaceHelm(t *testing.T) {
// common.TestReplaceHelm(t)
// }

// func TestRunTimeout(t *testing.T) {
// common.TestRunTimeout(t)
// }

func TestRunTimeout(t *testing.T) {
common.TestRunTimeout(t)
func TestReallyLongLogs(t *testing.T) {
common.TestReallyLongLogs(t)
}
Loading

0 comments on commit 20d8b16

Please sign in to comment.