This PR adds a minimum set of Helm tests for the Helm chart.
It's heavily based on the approach in [1], but uses a golden-files-based approach instead.
It also runs helm template directly instead of importing the entire Kubernetes API.
Golden files can be updated by running go test ./helm/tests -update or by running make update-golden-files.
[1] https://github.com/coder/enterprise-helmFixes#6552
* added script for table creation
* added tags to audit-logs.md
* removed log
* removed empty block line
* PR feedback
* modify check_unstaged
* third times the charm maybe
* spelling
* relative path
* excluding from the right script this time
* sorted resources to ensure table order
* running make cmd
* running make again
* ensuring order on subtable
* docs: audit, deploymentconfig, files, parameters
* Fix: mark as binary
* Fix: show format in docs
* Fix: use .swaggo
* Fix: swagger notice
* Swagger notice
* chore: Improve project-wide prettier formatting and ignored files
* chore: `Run make fmt/prettier`
* Fix gitignore for `.vscode` folder so that ! works
* Add comment in `.prettierrc.yaml` to explain `.editorconfig`
* Remove scripts/apidocgen/markdown-template/README.md
* Use `yq` for processing prettierrc, update lib.sh dependency check
* Add `yq` to Dockerfile and Nix
* chore: Close idle connections on test cleanup
It's possible that this was the source of a leak on Windows...
* ci: use big runners
* fix: Improve tailnet connections by reducing timeouts
This awaits connection ping before running a dial. Before,
we were hitting the TCP retransmission and handshake timeouts,
which could intermittently add 1 or 5 seconds to a connection
being initialized.
* Add logging to Startupscript test
* Add better logging
* Write startup script logs to fs dir
* Fix startup script test
* Fix startup script test
* Reduce test timeout
* Use central tmp dir in agent
* Adjust output
* Skip startup script test on Windows
Co-authored-by: Kyle Carberry <kyle@carberry.com>
This was breaking the release process. Namely it was running
the `gen` targets due to the dependency tree, which was failing
on macOS and Linux runners. This revert can be reverted once
we fix that up.
This caused the following issues:
- Slim binaries weren't being updated.
- The coder.tar.ztd was misplaced.
- There is no coder.sha1 file with proper filenames.
This should be reintroduced in a future change with those fixes.
* fix: Remove explicit coverpkg github.com/coder/coder/codersdk
This package is already covered by ./...
* fix: Ignore test utils in coverage (clitest, coderdtest, ptytest)
This commit lowers the postgres test timeout from 30m to 20m, currently
our postgres tests seem to take 8-10m, a 2x factor should suffice.
Comments were updated in both places to reflect the reasoning and
necessity of keeping these values in sync.
They used to take longer but the `count` was lowered in
3d40cb85b7.
The actual timeout value of `make test-postgres` got overlooked in
https://github.com/coder/coder/pull/3079.
It's unnecessary for these to run twice. It increases CI times without
providing much additional assurance tests don't have race conditions.
This already runs with `-race` too.
* 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
- Running make dev now prompts you to run ./scripts/develop.sh manually, as GNU make does not appear to pass SIGINT to subprocesses.
- Added checks to develop.sh to ensure that coderd is listening before running our initial setup steps
- Add some more troubleshooting/debugging output to develop.sh
This commit applies some recommended settings to sacrifice durability
for speed for our testing database:
- Mount PGDATA dir on a tmpfs (--tmpfs /tmp)
- Turn off fsync
- Turn off synchronous_commit
- Turn off full_page_writes
Ref: https://www.postgresql.org/docs/current/non-durability.html
* Fix socket leak, clean up single use postgres databases
Signed-off-by: Spike Curtis <spike@coder.com>
* Move migrate close defer until after we know it is not nil
Signed-off-by: Spike Curtis <spike@coder.com>
* feat: Implement pagination for template versions
* feat: Use unified pagination between users and template versions
* Sync codepaths between users and template versions
* Create requestOption type in codersdk and add test
* Fix created_at edge case for pagination cursor in queries
* feat: Add support for json omitempty and embedded structs in apitypings (#1318)
* Add scripts/apitypings/main.go to Makefile
This fixes paths not resolving in macOS, causing
the build target to fail. This also renames the
site target to specify the index.html, which is
the output artifact of building the site.
This enables a "kubernetes_pod" to attach multiple agents that
could be for multiple services. Each agent is required to have
a unique name, so SSH syntax is:
`coder ssh <workspace>.<agent>`
A resource can have zero agents too, they aren't required.
* feat: Add AWS instance identity authentication
This allows zero-trust authentication for all AWS instances.
Prior to this, AWS instances could be used by passing `CODER_TOKEN`
as an environment variable to the startup script. AWS explicitly
states that secrets should not be passed in startup scripts because
it's user-readable.
* Fix sha256 verbosity
* Fix HTTP client being exposed on auth
* chore: Move httpmw to /coderd directory
httpmw is specific to coderd and should be scoped under coderd
* chore: Move httpapi to /coderd directory
httpapi is specific to coderd and should be scoped under coderd
* chore: Move database to /coderd directory
database is specific to coderd and should be scoped under coderd
* chore: Update codecov & gitattributes for generated files
* chore: Update Makefile
* feat: Add systemd service and production deployment
This modifies CI to use a dpkg produced from release to update and
run Coder on a tiny VM in GCP.
It's intentionally kept simple, because customers should
be able to get this same easy install experience.
* Update globalSetup.ts
* Update globalSetup.ts
* Update globalSetup.ts
* Update coder.yaml
* Use pinned version of Go
Since it copied to a nested directory, it's very confusing if you
already had a `coder` binary in your `~/go/bin`, since it would always
prefer the `coder` in the higher directory.
* Install and configure XState
* userXService - typegen not working yet
* Lint, fix error transitions
* Lint
* Change initial state to handle loss of state
* Fix gitignore
* Fix types by hook or by crook
* Use xservice in all pages
* Glue/visual component separation
* Fix dependency merge
* Lint
* Remove UserContext
* Remove inspector
* Add typegen command to site/out
* Fix index page redirects
* DRY up nav and redirects
* Moves based on merge
* Moving Page helpers into Page dir
* Move xservice into src, update script
* Move and storybook navbarview
* Update docs
* Install MSW
* Reorganization, with apologies
* Missed spots
* Add mock handlers
* Configure jest for msw
* Fix typos
* Shift unit test to NavbarView
* Fix test types
* Rename NavbarView test
* Attempt at test, wip
* Fix config
* Be logged out, only warn
* Conditionally show text to help test
* Use a Context for MSW's sake
* mocks -> test_helpers
* Enable dev tools
* Format
* Fix import
* Fixes
* Lint
* run typegen postinstall
Co-authored-by: Bryan Phelps <bryan@coder.com>