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