From 232aa5de04188af18e32bc2cc35a08f6e0eb0340 Mon Sep 17 00:00:00 2001 From: Greg Dennis <5436032+greg-dennis@users.noreply.github.com> Date: Wed, 1 Nov 2023 15:57:00 -0400 Subject: [PATCH] Use LFS to parse replay logs from file paths (#2332) * Add .gitattributes to enable LFS * Replay tests to use file paths, not URLs * Remove errant characters * Parse -> ParseFile --- .gitattributes | 1 + .../tests/diff_command_trees/diff_command_trees_test.go | 4 ++-- .../replay/tests/presession_test/presession_test.go | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..f2548bd8702 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.pb filter=lfs diff=lfs merge=lfs -text diff --git a/feature/experimental/replay/tests/diff_command_trees/diff_command_trees_test.go b/feature/experimental/replay/tests/diff_command_trees/diff_command_trees_test.go index 3e2f203d6cf..d27a86e6200 100644 --- a/feature/experimental/replay/tests/diff_command_trees/diff_command_trees_test.go +++ b/feature/experimental/replay/tests/diff_command_trees/diff_command_trees_test.go @@ -29,9 +29,9 @@ func TestMain(m *testing.M) { } func TestReplay(t *testing.T) { - const logFile = "https://github.com/openconfig/featureprofiles/raw/main/feature/experimental/replay/tests/diff_command_trees/grpclog.pb" + const logFile = "grpclog.pb" t.Logf("Parsing log file: %v", logFile) - rec := replayer.ParseURL(t, logFile) + rec := replayer.ParseFile(t, logFile) dut := ondatra.DUT(t, "dut") portMap := map[string]string{} diff --git a/feature/experimental/replay/tests/presession_test/presession_test.go b/feature/experimental/replay/tests/presession_test/presession_test.go index a06cef2e971..9ed9dea0cea 100644 --- a/feature/experimental/replay/tests/presession_test/presession_test.go +++ b/feature/experimental/replay/tests/presession_test/presession_test.go @@ -29,9 +29,9 @@ func TestMain(m *testing.M) { } func TestReplay(t *testing.T) { - const logFile = "https://github.com/openconfig/featureprofiles/raw/main/feature/experimental/replay/tests/presession_test/grpclog.pb" + const logFile = "grpclog.pb" t.Logf("Parsing log file: %v", logFile) - rec := replayer.ParseURL(t, logFile) + rec := replayer.ParseFile(t, logFile) dut := ondatra.DUT(t, "dut") portMap := map[string]string{}