Skip to content

feat: add customizable upgrade message on client/server version mismatch #11587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jan 30, 2024
Merged
Prev Previous commit
Next Next commit
delete cruft
  • Loading branch information
sreya committed Jan 12, 2024
commit 8e6385a98c74c332bd53f244a1708a8303c5c96a
25 changes: 0 additions & 25 deletions cli/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,31 +105,6 @@ func TestRoot(t *testing.T) {
require.ErrorContains(t, err, "unexpected status code 410")
require.EqualValues(t, 1, atomic.LoadInt64(&called), "called exactly once")
})

t.Run("VersionMismatchWarning", func(t *testing.T) {
t.Parallel()

var (
expectedUpgradeMessage = "My custom upgrade message"
dv = coderdtest.DeploymentValues(t)
)
dv.CLIUpgradeMessage = clibase.String(expectedUpgradeMessage)

client := coderdtest.New(t, &coderdtest.Options{
DeploymentValues: dv,
})

_ = coderdtest.CreateFirstUser(t, client)

inv, root := clitest.New(t, "ls")
clitest.SetupConfig(t, client, root)

var buf bytes.Buffer
inv.Stderr = &buf
err := inv.Run()
require.NoError(t, err)
fmt.Println("output: ", buf.String())
})
}

// TestDERPHeaders ensures that the client sends the global `--header`s and
Expand Down