Use typeurl.Any instead of github.com/gogo/protobuf/types.Any

This commit upgrades github.com/containerd/typeurl to use typeurl.Any.
The interface hides gogo/protobuf/types.Any from containerd's Go client.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2022-03-22 00:40:39 +00:00
parent 551516a18d
commit 96b16b447d
42 changed files with 336 additions and 152 deletions

View File

@@ -1440,11 +1440,11 @@ func TestContainerExtensions(t *testing.T) {
if len(cExts) != 1 {
t.Errorf("expected 1 container extension")
}
if cExts["hello"].TypeUrl != ext.TypeUrl {
t.Errorf("got unexpected type url for extension: %s", cExts["hello"].TypeUrl)
if actual := cExts["hello"].GetTypeUrl(); actual != ext.TypeUrl {
t.Errorf("got unexpected type url for extension: %s", actual)
}
if !bytes.Equal(cExts["hello"].Value, ext.Value) {
t.Errorf("expected extension value %q, got: %q", ext.Value, cExts["hello"].Value)
if actual := cExts["hello"].GetValue(); !bytes.Equal(actual, ext.Value) {
t.Errorf("expected extension value %q, got: %q", ext.Value, actual)
}
}