Skip to content

Commit 9203d40

Browse files
committed
chore: execute goimports to format the code
Signed-off-by: xibeiyoumian <[email protected]>
1 parent d093862 commit 9203d40

File tree

3 files changed

+43
-42
lines changed

3 files changed

+43
-42
lines changed

infra/ec2/common/template.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import (
66
"crypto/x509"
77
"encoding/pem"
88
"fmt"
9+
"os"
10+
"strings"
11+
"text/template"
12+
913
"github.com/aws/aws-cdk-go/awscdk/v2"
1014
"github.com/aws/aws-cdk-go/awscdk/v2/awsec2"
1115
"github.com/aws/aws-cdk-go/awscdk/v2/awsiam"
@@ -16,9 +20,6 @@ import (
1620
"github.com/google/uuid"
1721
"github.com/rs/zerolog/log"
1822
"golang.org/x/crypto/ssh"
19-
"os"
20-
"strings"
21-
"text/template"
2223
)
2324

2425
const (

infra/ec2/ec2.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"ec2/common"
5+
56
"github.com/aws/aws-cdk-go/awscdk/v2/awsec2"
67
"github.com/aws/jsii-runtime-go"
78
"github.com/rs/zerolog/log"

tools/flakeguard/runner/parser/parser_test.go

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,51 +1091,50 @@ func TestParseFiles_WithPanicEventFile(t *testing.T) {
10911091

10921092
// Map test names to expected values for easier assertions
10931093
expected := map[string]struct {
1094-
pkg string
1095-
pkgPanic bool
1096-
panic bool
1097-
passRatio float64
1098-
runs int
1099-
failures int
1100-
successes int
1101-
skipped bool
1102-
skips int
1094+
pkg string
1095+
pkgPanic bool
1096+
panic bool
1097+
passRatio float64
1098+
runs int
1099+
failures int
1100+
successes int
1101+
skipped bool
1102+
skips int
11031103
}{
1104-
"Test_EventHandlerStateSync": {
1105-
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: true, panic: false, passRatio: 1, runs: 1, failures: 0, successes: 1, skipped: false, skips: 0,
1106-
},
1107-
"Test_InitialStateSync": {
1108-
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: true, panic: false, passRatio: 1, runs: 1, failures: 0, successes: 1, skipped: false, skips: 0,
1109-
},
1110-
"Test_RegistrySyncer_SkipsEventsNotBelongingToDON": {
1111-
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: true, panic: false, passRatio: 1, runs: 1, failures: 0, successes: 1, skipped: false, skips: 0,
1112-
},
1113-
"Test_RegistrySyncer_WorkflowRegistered_InitiallyActivated": {
1114-
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: true, panic: true, passRatio: 0, runs: 1, failures: 1, successes: 0, skipped: false, skips: 0,
1115-
},
1116-
"Test_RegistrySyncer_WorkflowRegistered_InitiallyPaused": {
1117-
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: true, panic: false, passRatio: 1, runs: 1, failures: 0, successes: 1, skipped: false, skips: 0,
1118-
},
1119-
"Test_SecretsWorker": {
1120-
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: false, panic: false, passRatio: 1, runs: 0, failures: 0, successes: 0, skipped: true, skips: 1,
1121-
},
1104+
"Test_EventHandlerStateSync": {
1105+
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: true, panic: false, passRatio: 1, runs: 1, failures: 0, successes: 1, skipped: false, skips: 0,
1106+
},
1107+
"Test_InitialStateSync": {
1108+
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: true, panic: false, passRatio: 1, runs: 1, failures: 0, successes: 1, skipped: false, skips: 0,
1109+
},
1110+
"Test_RegistrySyncer_SkipsEventsNotBelongingToDON": {
1111+
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: true, panic: false, passRatio: 1, runs: 1, failures: 0, successes: 1, skipped: false, skips: 0,
1112+
},
1113+
"Test_RegistrySyncer_WorkflowRegistered_InitiallyActivated": {
1114+
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: true, panic: true, passRatio: 0, runs: 1, failures: 1, successes: 0, skipped: false, skips: 0,
1115+
},
1116+
"Test_RegistrySyncer_WorkflowRegistered_InitiallyPaused": {
1117+
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: true, panic: false, passRatio: 1, runs: 1, failures: 0, successes: 1, skipped: false, skips: 0,
1118+
},
1119+
"Test_SecretsWorker": {
1120+
pkg: "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/workflows/syncer", pkgPanic: false, panic: false, passRatio: 1, runs: 0, failures: 0, successes: 0, skipped: true, skips: 1,
1121+
},
11221122
}
11231123

11241124
for _, r := range results {
1125-
exp, ok := expected[r.TestName]
1126-
require.True(t, ok, "Unexpected test name: %s", r.TestName)
1127-
assert.Equal(t, exp.pkg, r.TestPackage, "Package mismatch for %s", r.TestName)
1128-
assert.Equal(t, exp.pkgPanic, r.PackagePanic, "PackagePanic mismatch for %s", r.TestName)
1129-
assert.Equal(t, exp.panic, r.Panic, "Panic mismatch for %s", r.TestName)
1130-
assert.InDelta(t, exp.passRatio, r.PassRatio, 0.001, "PassRatio mismatch for %s", r.TestName)
1131-
assert.Equal(t, exp.runs, r.Runs, "Runs mismatch for %s", r.TestName)
1132-
assert.Equal(t, exp.failures, r.Failures, "Failures mismatch for %s", r.TestName)
1133-
assert.Equal(t, exp.successes, r.Successes, "Successes mismatch for %s", r.TestName)
1134-
assert.Equal(t, exp.skipped, r.Skipped, "Skipped mismatch for %s", r.TestName)
1135-
assert.Equal(t, exp.skips, r.Skips, "Skips count mismatch for %s", r.TestName)
1125+
exp, ok := expected[r.TestName]
1126+
require.True(t, ok, "Unexpected test name: %s", r.TestName)
1127+
assert.Equal(t, exp.pkg, r.TestPackage, "Package mismatch for %s", r.TestName)
1128+
assert.Equal(t, exp.pkgPanic, r.PackagePanic, "PackagePanic mismatch for %s", r.TestName)
1129+
assert.Equal(t, exp.panic, r.Panic, "Panic mismatch for %s", r.TestName)
1130+
assert.InDelta(t, exp.passRatio, r.PassRatio, 0.001, "PassRatio mismatch for %s", r.TestName)
1131+
assert.Equal(t, exp.runs, r.Runs, "Runs mismatch for %s", r.TestName)
1132+
assert.Equal(t, exp.failures, r.Failures, "Failures mismatch for %s", r.TestName)
1133+
assert.Equal(t, exp.successes, r.Successes, "Successes mismatch for %s", r.TestName)
1134+
assert.Equal(t, exp.skipped, r.Skipped, "Skipped mismatch for %s", r.TestName)
1135+
assert.Equal(t, exp.skips, r.Skips, "Skips count mismatch for %s", r.TestName)
11361136
}
11371137

1138-
11391138
}
11401139

11411140
func TestParseFiles_WithPanicEventFileSpecific(t *testing.T) {

0 commit comments

Comments
 (0)