Skip to content

Commit

Permalink
Explicit wantServices in TestRegisterGRPCServices
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosNihelton committed Sep 6, 2024
1 parent 6f4c70d commit 729c4c6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions windows-agent/internal/proservices/proservices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,16 @@ func TestRegisterGRPCServices(t *testing.T) {
wantServices []string
wantErr bool
}{
"Success with WSL net adapter": {},
"Success with WSL net adapter": {wantServices: defaultServices},
"Success without WSL net adapter": {withoutWSLNet: true, wantServices: []string{"agentapi.UI"}},

"Error with insecure requests": {insecureClient: true, wantErr: true},
"Error with insecure requests": {insecureClient: true, wantServices: defaultServices, wantErr: true},
}

for name, tc := range testCases {
t.Run(name, func(t *testing.T) {
t.Parallel()

if tc.wantServices == nil {
tc.wantServices = defaultServices
}

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)

Expand Down

0 comments on commit 729c4c6

Please sign in to comment.