From 287e98ad670b29d849576e9f3204a6b42e91ea0c Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 1 Oct 2024 09:38:57 +0300 Subject: [PATCH] [#120] proto/test: Add protojson compatibility test It is failing, thus is skipped. But implement it now to make it easier to see it failing. Signed-off-by: Evgenii Stratonikov --- util/proto/marshal_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util/proto/marshal_test.go b/util/proto/marshal_test.go index 1cd7005..98422fc 100644 --- a/util/proto/marshal_test.go +++ b/util/proto/marshal_test.go @@ -76,6 +76,13 @@ func TestStableMarshalSingle(t *testing.T) { var actual test.Primitives require.NoError(t, protojson.Unmarshal(r, &actual)) + t.Run("protojson compatibility", func(t *testing.T) { + t.Skip() + data, err := protojson.Marshal(&actual) + require.NoError(t, err) + require.JSONEq(t, string(data), string(r)) + }) + var actualFrostfs generated.Primitives require.NoError(t, actualFrostfs.UnmarshalJSON(r)) require.Equal(t, tc.input, &actualFrostfs)