@@ -19,18 +19,25 @@ package main
19
19
import (
20
20
"context"
21
21
"fmt"
22
+ "math/rand"
22
23
"os"
23
24
"sync"
25
+ "testing"
24
26
"time"
25
27
26
28
"github.com/antithesishq/antithesis-sdk-go/assert"
29
+ "github.com/stretchr/testify/require"
30
+ "go.uber.org/zap"
27
31
"golang.org/x/time/rate"
28
32
33
+ "go.etcd.io/etcd/tests/v3/framework/e2e"
29
34
"go.etcd.io/etcd/tests/v3/robustness/client"
30
35
"go.etcd.io/etcd/tests/v3/robustness/identity"
31
36
robustnessrand "go.etcd.io/etcd/tests/v3/robustness/random"
32
37
"go.etcd.io/etcd/tests/v3/robustness/report"
38
+ "go.etcd.io/etcd/tests/v3/robustness/scenarios"
33
39
"go.etcd.io/etcd/tests/v3/robustness/traffic"
40
+ "go.etcd.io/etcd/tests/v3/robustness/validate"
34
41
)
35
42
36
43
var profile = traffic.Profile {
@@ -82,6 +89,14 @@ func testRobustness(ctx context.Context, baseTime time.Time, duration time.Durat
82
89
assert .Reachable ("Completed robustness traffic generation" , nil )
83
90
}
84
91
92
+ func validateReport (ctx context.Context , lg * zap.Logger , c * e2e.EtcdProcessCluster , s scenarios.TestScenario , t * testing.T ) {
93
+ r := report.TestReport {Logger : lg , Cluster : c }
94
+ persistedRequests , err := report .PersistedRequestsCluster (lg , c )
95
+ require .NoError (t , err )
96
+ validateConfig := validate.Config {ExpectRevisionUnique : s .Traffic .ExpectUniqueRevision ()}
97
+ r .Visualize = validate .ValidateAndReturnVisualize (t , lg , validateConfig , r .Client , persistedRequests , 5 * time .Minute ).Visualize
98
+ }
99
+
85
100
func connect (endpoint string , ids identity.Provider , baseTime time.Time ) * client.RecordingClient {
86
101
cli , err := client .NewRecordingClient ([]string {endpoint }, ids , baseTime )
87
102
if err != nil {
0 commit comments