fix(cli): ssh: auto-update workspace (#11773)

This commit is contained in:
Marcin Tojek
2024-01-23 18:01:44 +01:00
committed by GitHub
parent 369821ea19
commit 77a4792ecd
5 changed files with 97 additions and 8 deletions
+10 -2
View File
@@ -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")
}
})
}