* fix: Remove use of `require` in `require.Eventually` in tests
Because require uses `t.FailNow()` and `require.Eventually` runs the
function in a goroutine, which is not allowed.
* feat: Add ruleguard for require.Eventually
Co-authored-by: Cian Johnston <cian@coder.com>
* Dev tunnel test uses local fake server; fixed port
Signed-off-by: Spike Curtis <spike@coder.com>
* Remove parallel for test
Signed-off-by: Spike Curtis <spike@coder.com>
* Fix segfault
Some contexts were moved closer to use so that test setup doesn't affect
timeout. And timeout was increased for some others to avoid flakyness
due to slow test runners.
* set a failed canceled job status correctly
resolves#1374
* added unit test for convertProvisionerJob
* Update coderd/provisionerjobs_internal_test.go
Co-authored-by: Cian Johnston <cian@coder.com>
* PR feedback
Co-authored-by: Cian Johnston <cian@coder.com>
Two coderd unit tests (TestPatchCancelTemplateVersion/Success and TestPatchCancelWorkspaceBuild) implied erroneously that the job was canceled successfully.
This is not the case, as these unit tests do not include a Provision_Complete response in the input to the
echo provisioner. Now explicitly checking the job error and bumping the force cancel interval to be longer.
Fixes#3083.
* Pass workspace owner email address to provisioner
* Remove owner_email and owner_username fields from agent metadata
* Add Git environment variables to example templates
* Remove "owner_name" field from provisioner metadata, use username instead
* Remove Git configuration from most templates, add documentation
* Proofreading/typo fixes from @mafredri
* Update example templates to latest version of terraform-provider-coder
* return parameters from Terraform provisioner in sorted order
* persist parameter indices in database and return them in correct order from API
* don't re-sort parameters by name when creating templates
- make default template max TTL 24 hours (still less than 168)
- make default workspace autostop 2 hours unless specified otherwise
- add instance type selector to aws templates
* test: Use a template to prevent migrations from running for every test
* Create a single makefile target
* Fix built-in race
* Extend timeout of built-in PostgreSQL fetch
* fix: Use WebSockets to stream workspace build logs
This was using a streaming HTTP request before, which didn't work
on my version of Chrome. This method seemed less reliable and standard
than a WebSocket, so figured switching would be best.
* Update site/src/xServices/workspaceBuild/workspaceBuildXService.ts
Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>
* Update site/src/pages/WorkspaceBuildPage/WorkspaceBuildPage.test.tsx
Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>
* Update site/src/api/api.ts
Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>
* Remove unused prop
Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>