Skip to content

Commit

Permalink
Fix duplword errors
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardGomezEscandell committed Sep 14, 2023
1 parent 727acff commit aeb1cb4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion windows-agent/internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ func TestFetchMicrosoftStoreSubscription(t *testing.T) {
}
}

// is is a convenience function to check if a registryState matches a certain state.
// is defines equality between flags. It is convenience function to check if a registryState matches a certain state.
func (state registryState) is(flag registryState) bool {
return state&flag == flag
}
Expand Down
4 changes: 2 additions & 2 deletions windows-agent/internal/distros/worker/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func TestTaskProcessing(t *testing.T) {
time.Sleep(clientTickPeriod)
}

// Testing task with with active connection
// Testing task with active connection
w.SetConnection(conn)

if !tc.wantExecuteCalled {
Expand Down Expand Up @@ -470,7 +470,7 @@ func TestTaskDeferral(t *testing.T) {
queuedTask := emptyTask{ID: uuid.NewString()}
deferredTask := emptyTask{ID: uuid.NewString()}

// Testing task with with active connection
// Testing task with active connection
wslInstanceService := newTestService(t)
conn := wslInstanceService.newClientConnection(t)
w.SetConnection(conn)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func CreateUser(ctx context.Context, d gowsl.Distro, userName string, userFullNa
}

if valid := UsernameIsValid(userName); !valid {
return 0, errors.New("username is is not valid")
return 0, errors.New("username is not valid")
}

// strip any punctuation or any math symbols, currency signs, dingbats, box-drawing characters, etc
Expand Down
2 changes: 1 addition & 1 deletion windows-agent/internal/proservices/ui/ui_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestGetSubscriptionInfo(t *testing.T) {
"Success with a store subscription": {config: mockConfig{source: config.SubscriptionMicrosoftStore}, wantType: store},
"Success with a read-only store subscription": {config: mockConfig{source: config.SubscriptionMicrosoftStore, registryReadOnly: true}, wantType: store, wantImmutable: true},

"Error when the the read-only check fails": {config: mockConfig{isReadOnlyErr: true}, wantErr: true},
"Error when the read-only check fails": {config: mockConfig{isReadOnlyErr: true}, wantErr: true},
"Error when the subscription cannot be retreived": {config: mockConfig{subscriptionErr: true}, wantErr: true},
}

Expand Down
4 changes: 2 additions & 2 deletions wsl-pro-service/internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func connectToControlStream(ctx context.Context, agentPortFilePath string, s sys

func getControlStreamAddress(agentPortFilePath string, s system.System) (string, error) {
/*
We parse the the port from the file written by the windows agent.
We parse the port from the file written by the windows agent.
*/
addr, err := os.ReadFile(agentPortFilePath)
if err != nil {
Expand All @@ -171,7 +171,7 @@ func getControlStreamAddress(agentPortFilePath string, s system.System) (string,

/*
We parse the IP address of the Windows host /etc/resolv.conf to know. We cannot use localhost
because WSL localhost forwarding only works for for Linux-side servers.
because WSL localhost forwarding only works for Linux-side servers.
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
Expand Down

0 comments on commit aeb1cb4

Please sign in to comment.