Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# Over time we should try tightening some of these.

linters-settings:
dupl:
# goal: 100
threshold: 412

exhaustruct:
include:
# Gradually extend to cover more of the codebase.
Expand Down Expand Up @@ -268,3 +272,4 @@ linters:
- typecheck
- unconvert
- unused
- dupl
17 changes: 3 additions & 14 deletions cli/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,13 +602,9 @@ func TestUpdateValidateRichParameters(t *testing.T) {
// Update the workspace
inv, root = clitest.New(t, "update", "my-workspace")
clitest.SetupConfig(t, client, root)
doneChan := make(chan struct{})

pty := ptytest.New(t).Attach(inv)
go func() {
defer close(doneChan)
err := inv.Run()
assert.NoError(t, err)
}()
clitest.Start(t, inv)

matches := []string{
stringParameterName, "second_option",
Expand All @@ -623,7 +619,6 @@ func TestUpdateValidateRichParameters(t *testing.T) {
pty.WriteLine(value)
}
}
<-doneChan
})

t.Run("ParameterOptionDisappeared", func(t *testing.T) {
Expand Down Expand Up @@ -668,13 +663,8 @@ func TestUpdateValidateRichParameters(t *testing.T) {
// Update the workspace
inv, root = clitest.New(t, "update", "my-workspace")
clitest.SetupConfig(t, client, root)
doneChan := make(chan struct{})
pty := ptytest.New(t).Attach(inv)
go func() {
defer close(doneChan)
err := inv.Run()
assert.NoError(t, err)
}()
clitest.Start(t, inv)

matches := []string{
stringParameterName, "Third option",
Expand All @@ -689,7 +679,6 @@ func TestUpdateValidateRichParameters(t *testing.T) {
pty.WriteLine(value)
}
}
<-doneChan
})

t.Run("ImmutableRequiredParameterExists_MutableRequiredParameterAdded", func(t *testing.T) {
Expand Down