You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
report.ErrorLogs=append(report.ErrorLogs, fmt.Sprintf("Interaction %d in test %s have an error with unmarshalling response body: %v. Recording it\n", i, path, err))
140
+
report.AddErrorLog(fmt.Sprintf("Interaction %d in test %s have an error with unmarshalling response body: %v. Recording it\n", i, path, err))
133
141
outputCassette.AddInteraction(interaction)
134
142
135
143
continue
136
144
}
137
145
138
146
ifm["status"] ==nil {
139
-
report.Logs=append(report.Logs, fmt.Sprintf("Interaction %d in test %s does not contain a status field. Recording it\n", i, path))
147
+
report.AddLog(fmt.Sprintf("Interaction %d in test %s does not contain a status field. Recording it\n", i, path))
report.Logs=append(report.Logs, fmt.Sprintf("Interaction %d in test %s is in a transient state while we are already in transitient state. No need to record it: %s\n", i, path, status))
157
+
report.AddLog(fmt.Sprintf("Interaction %d in test %s is in a transient state while we are already in transitient state. No need to record it: %s\n", i, path, status))
150
158
report.SkippedInteraction++
151
159
} else {
152
-
report.Logs=append(report.Logs, fmt.Sprintf("Interaction %d in test %s is in a transient state: %s, Recording it\n", i, path, status))
160
+
report.AddLog(fmt.Sprintf("Interaction %d in test %s is in a transient state: %s, Recording it\n", i, path, status))
153
161
154
162
transitioning=true
155
163
156
164
outputCassette.AddInteraction(interaction)
157
165
}
158
166
} else {
159
167
iftransitioning {
160
-
report.Logs=append(report.Logs, fmt.Sprintf("Interaction %d in test %s is not in a transient state anymore: %s, Recording it\n", i, path, status))
168
+
report.AddLog(fmt.Sprintf("Interaction %d in test %s is not in a transient state anymore: %s, Recording it\n", i, path, status))
161
169
outputCassette.AddInteraction(interaction)
170
+
162
171
transitioning=false
163
172
} else {
164
-
report.Logs=append(report.Logs, fmt.Sprintf("Interaction %d in test %s is not in a transient state: %s, Recording it\n", i, path, status))
173
+
report.AddLog(fmt.Sprintf("Interaction %d in test %s is not in a transient state: %s, Recording it\n", i, path, status))
165
174
outputCassette.AddInteraction(interaction)
166
175
}
167
176
}
168
177
}
169
178
170
179
err=outputCassette.Save()
171
180
iferr!=nil {
172
-
returnreport, fmt.Errorf("error while saving file: %v", err)
181
+
returnreport, fmt.Errorf("error while saving file: %w", err)
0 commit comments