func TestByContainerSupported(t *testing.T) { cases := []struct { proto string expected bool }{ {"appv1", true}, {"dockerv1", true}, {"invalid", false}, } var bycontainer snapshot.UpdateServiceSnapshotByContainer for _, c := range cases { assert.Equal(t, c.expected, bycontainer.Supported(c.proto), "Fail to get supported status") } }