Skip to content

Commit d1844f7

Browse files
committed
lint
1 parent 89ed17c commit d1844f7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/internal/atlas_e2e_test_generator.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ func (g *AtlasE2ETestGenerator) prepareSnapshot(r *http.Response) *http.Response
662662
return resp
663663
}
664664

665-
func (g *AtlasE2ETestGenerator) redactSensitiveData(out []byte) ([]byte, error) {
665+
func redactSensitiveData(out []byte) ([]byte, error) {
666666
// This regex matches: "linkToken":"<any value>"
667667
jsonRe := regexp.MustCompile(`("linkToken"\s*:\s*")[^"]*(")`)
668668
return jsonRe.ReplaceAll(out, []byte(`${1}[REDACTED]${2}`)), nil
@@ -676,7 +676,7 @@ func (g *AtlasE2ETestGenerator) storeSnapshot(r *http.Response) {
676676
g.t.Fatal(err)
677677
}
678678

679-
out, err = g.redactSensitiveData(out)
679+
out, err = redactSensitiveData(out)
680680
if err != nil {
681681
g.t.Fatal(err)
682682
}
@@ -749,7 +749,11 @@ func (g *AtlasE2ETestGenerator) snapshotServer() {
749749

750750
proxy := httputil.NewSingleHostReverseProxy(targetURL)
751751

752+
g.t.Logf("currentSnapshotMode: %v\n\n", g.currentSnapshotMode)
753+
752754
proxy.ModifyResponse = func(resp *http.Response) error {
755+
g.t.Logf("modify response\n\n")
756+
fmt.Printf("modify response: %+v\n", resp)
753757
snapshot := g.prepareSnapshot(resp)
754758

755759
if g.skipSnapshots(snapshot, g.lastSnapshot) {
@@ -765,6 +769,7 @@ func (g *AtlasE2ETestGenerator) snapshotServer() {
765769

766770
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
767771
if g.currentSnapshotMode == snapshotModeUpdate {
772+
g.t.Logf("update mode\n\n")
768773
r.Host = targetURL.Host
769774
proxy.ServeHTTP(w, r)
770775
return

0 commit comments

Comments
 (0)