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 913ea99
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 208 deletions.
3 changes: 2 additions & 1 deletion .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 Expand Up @@ -115,7 +116,7 @@ jobs:
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
- name: Upload test log
uses: actions/upload-artifact@v2
if: failure()
# if: failure()
with:
name: remote-runner-test-log
path: /tmp/remoterunnergotest.log
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ k8s_test_e2e:
go test ./k8s/e2e/local-runner -count 1 -test.parallel=12 -v $(args)

k8s_test_e2e_ci:
go test ./k8s/e2e/local-runner -count 1 -v -test.parallel=14 -test.timeout=1h -json 2>&1 | tee /tmp/gotest.log | gotestfmt
go test ./k8s/e2e/local-runner -count 1 -v -test.parallel=14 -test.timeout=1h -json 2>&1 | tee /tmp/gotest.log

k8s_test_e2e_ci_remote_runner:
go test ./k8s/e2e/remote-runner -count 1 -v -test.parallel=16 -test.timeout=1h -json 2>&1 | tee /tmp/remoterunnergotest.log | gotestfmt
go test ./k8s/e2e/remote-runner -count 1 -v -test.parallel=16 -test.timeout=1h -json 2>&1 | tee /tmp/remoterunnergotest.log

.PHONY: examples
examples:
Expand Down
17 changes: 17 additions & 0 deletions k8s/e2e/common/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,3 +446,20 @@ 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)
val, _ := os.LookupEnv(config.EnvVarJ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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
l.Info().Int("count", len(s)).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 913ea99

Please sign in to comment.