Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemschema_test: fix timestamp stripping regex #85914

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/sql/catalog/systemschema_test/systemschema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestValidateSystemSchemaAfterBootStrap(t *testing.T) {
defer leaktest.AfterTest(t)()

ctx := context.Background()
wallTimeRE, err := regexp.Compile(`"wallTime":"\d*"`)
hlcRE, err := regexp.Compile(`"wallTime":"\d*"(,"logical":\d*)?`)
require.NoError(t, err)

datadriven.Walk(t, testutils.TestDataPath(t, "bootstrap"), func(t *testing.T, path string) {
Expand Down Expand Up @@ -114,7 +114,7 @@ func TestValidateSystemSchemaAfterBootStrap(t *testing.T) {
require.NotNilf(t, ev.Desc, "unexpectedly missing descriptor in %s", ev)
str, err := je.MarshalToString(ev.Desc)
require.NoError(t, err, "unexpected descriptor marshal error")
str = wallTimeRE.ReplaceAllString(str, `"wallTime":"0"`)
str = hlcRE.ReplaceAllString(str, `"wallTime":"0"`)
sb.WriteString(str)
sb.WriteRune('\n')
}
Expand Down