mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(cli): ssh: auto-update workspace (#11773)
This commit is contained in:
@@ -159,8 +159,16 @@ func TestStart(t *testing.T) {
|
||||
|
||||
ws = coderdtest.MustWorkspace(t, c.Client, ws.ID)
|
||||
require.Equal(t, c.ExpectedVersion, ws.LatestBuild.TemplateVersionID)
|
||||
if initialTemplateVersion != ws.LatestBuild.TemplateVersionID {
|
||||
require.Contains(t, buf.String(), "Failed to restart with the template version from your last build. Policy may require you to restart with the current active template version.")
|
||||
if initialTemplateVersion == ws.LatestBuild.TemplateVersionID {
|
||||
return
|
||||
}
|
||||
|
||||
if cmd == "start" {
|
||||
require.Contains(t, buf.String(), "Unable to start the workspace with the template version from the last build")
|
||||
}
|
||||
|
||||
if cmd == "restart" {
|
||||
require.Contains(t, buf.String(), "Unable to restart the workspace with the template version from the last build")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user