Skip to content

Commit c5180da

Browse files
authored
Merge pull request #256 from brevdev/lint
fix(BREV-1761): Lint, Fix Failing Test
2 parents 3042f7b + 725f65a commit c5180da

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

pkg/cmd/open/open.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func determineEditorType(args []string) (string, error) {
151151
}
152152

153153
// Fetch workspace info, then open code editor
154-
func runOpenCommand(t *terminal.Terminal, tstore OpenStore, wsIDOrName string, setupDoneString string, directory string, host bool, editorType string) error { //nolint:funlen // define brev command
154+
func runOpenCommand(t *terminal.Terminal, tstore OpenStore, wsIDOrName string, setupDoneString string, directory string, host bool, editorType string) error { //nolint:funlen,gocyclo // define brev command
155155
// todo check if workspace is stopped and start if it if it is stopped
156156
fmt.Println("finding your instance...")
157157
res := refresh.RunRefreshAsync(tstore)

pkg/ssh/sshconfigurer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ func tmplAndValToString(tmpl *template.Template, val interface{}) (string, error
276276
return buf.String(), nil
277277
}
278278

279-
func makeSSHConfigEntryV2(workspace entity.Workspace, privateKeyPath string, cloudflaredBinaryPath string) (string, error) { //nolint:funlen // ok
279+
func makeSSHConfigEntryV2(workspace entity.Workspace, privateKeyPath string, cloudflaredBinaryPath string) (string, error) { //nolint:funlen,gocyclo // ok
280280
alias := string(workspace.GetLocalIdentifier())
281281
privateKeyPath = "\"" + privateKeyPath + "\""
282282
if workspace.IsLegacy() {

pkg/ssh/sshconfigurer_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var somePlainWorkspaces = []entity.Workspace{
2323
Status: entity.Running,
2424
Password: "sdfal",
2525
GitRepo: "gitrepo",
26+
SSHUser: "ubuntu",
2627
},
2728
{
2829
ID: "test-id-2",
@@ -35,6 +36,7 @@ var somePlainWorkspaces = []entity.Workspace{
3536
Status: entity.Running,
3637
Password: "sdfal",
3738
GitRepo: "gitrepo",
39+
SSHUser: "ubuntu",
3840
},
3941
}
4042

@@ -340,6 +342,7 @@ Host testName2-host
340342
Status: entity.Running,
341343
Password: "sdfal",
342344
GitRepo: "gitrepo",
345+
SSHUser: "ubuntu",
343346
},
344347
privateKeyPath: "/my/priv/key.pem",
345348
runRemoteCMD: true,
@@ -389,6 +392,7 @@ Host testName2-host
389392
Password: "sdfal",
390393
GitRepo: "gitrepo",
391394
SSHPort: 2022,
395+
SSHUser: "ubuntu",
392396
},
393397
privateKeyPath: "/my/priv/key.pem",
394398
runRemoteCMD: true,
@@ -505,6 +509,7 @@ Host testName2-host
505509
GitRepo: "gitrepo",
506510
SSHProxyHostname: "test-verb-proxy.com",
507511
HostSSHProxyHostname: "test-host-proxy.com",
512+
SSHUser: "ubuntu",
508513
},
509514
privateKeyPath: "/my/priv/key.pem",
510515
cloudflaredBinaryPath: "/Users/tmontfort/.brev/cloudflared",
@@ -632,6 +637,7 @@ func TestSSHConfigurerV2_Update(t *testing.T) { //nolint // this is a test
632637
Status: entity.Running,
633638
Password: "sdfal",
634639
GitRepo: "gitrepo",
640+
SSHUser: "ubuntu",
635641
},
636642
},
637643
},
@@ -691,6 +697,7 @@ Host testName1-host
691697
Status: entity.Running,
692698
Password: "sdfal",
693699
GitRepo: "gitrepo",
700+
SSHUser: "ubuntu",
694701
},
695702
},
696703
},

0 commit comments

Comments
 (0)