feat(GODT-2666): feat(GODT-2667): introduce sessionID in bridge.

This commit is contained in:
Xavier Michelon
2023-06-06 15:44:33 +02:00
parent 1e9a77c7b2
commit ac00ef1b64
24 changed files with 550 additions and 138 deletions

View File

@ -42,6 +42,23 @@ func TestRemoveFlagWithValue(t *testing.T) {
}
}
func TestRemoveFlagsWithValue(t *testing.T) {
tests := []struct {
argList []string
flags []string
expected []string
}{
{[]string{}, []string{"a", "b"}, nil},
{[]string{"-a", "-b=value", "-c"}, []string{"b"}, []string{"-a", "-c"}},
{[]string{"-a", "--b=value", "-c"}, []string{"b", "c"}, []string{"-a"}},
{[]string{"-a", "-b", "value", "-c"}, []string{"c", "b"}, []string{"-a"}},
}
for _, tt := range tests {
require.Equal(t, removeFlagsWithValue(tt.argList, tt.flags...), tt.expected)
}
}
func TestRemoveFlag(t *testing.T) {
tests := []struct {
argList []string