Skip to content

Commit

Permalink
Expand comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Porges committed May 20, 2021
1 parent 40661b9 commit 4d2cd21
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hack/generated/pkg/testcommon/test_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func createRecorder(cassetteName string, recordReplay bool) (autorest.Authorizer
var dateMatcher *regexp.Regexp = regexp.MustCompile(`\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d+)?Z`)

// hideDates replaces all ISO8601 datetimes with a fixed value
// this lets us match requests that may contain time-sensitive information (timestamps, etc)
func hideDates(s string) string {
return dateMatcher.ReplaceAllLiteralString(s, "2001-02-03T04:05:06Z") // this should be recognizable/parseable as a fake date
}
Expand Down

0 comments on commit 4d2cd21

Please sign in to comment.