Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/legacy-system-tests-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,19 @@ jobs:
echo "Running tests for: $CHAINLINK_IMAGE, test: $TESTCMD"
eval $TESTCMD

- name: Show Docker containers status
if: failure()
shell: bash
run: docker ps -a

- name: Upload Logs
if: always() && steps.gate.outputs.should_run == 'true'
uses: actions/upload-artifact@v7
with:
name: container-logs-${{ matrix.logs_archive_name }}-${{ github.run_id }}-${{ github.run_attempt }}
path: devenv/tests/${{ matrix.tests_dir }}/logs
retention-days: 3

- name: Upload Go pprof
if: always()
uses: actions/upload-artifact@v7
Expand Down
10 changes: 10 additions & 0 deletions devenv/tests/logpoller/logpoller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ func executePollerTest(t *testing.T, cfg *Config, allowedLogMessages ...products
t.Cleanup(func() {
err := products.ScanLogs(l, products.DefaultSettings(allowedLogMessages...))
require.NoError(t, err, "Found concerning logs in Chainlink Node logs")

if t.Failed() {
_, cErr := framework.SaveContainerLogs(fmt.Sprintf("%s-%s", framework.DefaultCTFLogsDir, t.Name()))
require.NoError(t, cErr)
}
})

outputFile := "../../env-out.toml"
Expand Down Expand Up @@ -328,6 +333,11 @@ func executeLogPollerReplay(t *testing.T, cfg *Config, consistencyTimeout string
t.Cleanup(func() {
err := products.ScanLogs(l, products.DefaultSettings())
require.NoError(t, err, "Found concerning logs in Chainlink Node logs")

if t.Failed() {
_, cErr := framework.SaveContainerLogs(fmt.Sprintf("%s-%s", framework.DefaultCTFLogsDir, t.Name()))
require.NoError(t, cErr)
}
})

eventsToEmit := []abi.Event{}
Expand Down
4 changes: 2 additions & 2 deletions devenv/tests/logpoller/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ func runLoopedGenerator(cfg *Config, client *seth.Client, logEmitters []contract
address := task.emitter.Address().String()

for _, event := range cfg.General.EventsToEmit {
l.Debug().Str("Emitter address", address).Str("Event type", event.Name).Str("index", fmt.Sprintf("%d/%d", current, cfg.LoopedConfig.ExecutionCount)).Msg("Emitting log from emitter")
l.Debug().Str("Emitter address", address).Str("Event type", event.Name).Str("index", fmt.Sprintf("%d/%d", current, cfg.LoopedConfig.ExecutionCount*cfg.General.Contracts)).Msg("Emitting log from emitter")
var err error
switch event.Name {
case "Log1":
Expand All @@ -834,7 +834,7 @@ func runLoopedGenerator(cfg *Config, client *seth.Client, logEmitters []contract
randomWait(cfg.LoopedConfig.MinEmitWaitTimeMs, cfg.LoopedConfig.MaxEmitWaitTimeMs)

if (current)%10 == 0 {
l.Info().Str("Emitter address", address).Str("Index", fmt.Sprintf("%d/%d", current, cfg.LoopedConfig.ExecutionCount)).Msgf("Emitted all %d events", len(cfg.General.EventsToEmit))
l.Info().Str("Emitter address", address).Str("Index", fmt.Sprintf("%d/%d", current, cfg.LoopedConfig.ExecutionCount*cfg.General.Contracts)).Msgf("Emitted all %d events", len(cfg.General.EventsToEmit))
}
}

Expand Down
Loading