Commit Graph

7 Commits

Author SHA1 Message Date
Asher 73e615da4e
Fix extension installation test
This throws now that the exit is non-zero.
2024-04-05 17:39:21 -08:00
Asher 6745a46034
Fix extension install test
This is not a valid ID (to install a specific version you use @) and,
quite strangely, Code is now returning an "extension not found" error if
the ID is invalid, breaking the test since we expect it to error about
the marketplace not existing.
2023-05-15 20:54:37 -08:00
Joe Previte c69f2c69f6
chore(testing): remove install/list tests (#5441)
Now that we have a test for `--help` which checks to make sure native
modules are working as expected, we don't need the `--install-extension`
test or the `--list-extensions` test.

We can also remove the `.vsix` fixture since we're not using that
either.
2022-08-10 22:59:36 +00:00
Joe Previte 6d8f30d579
feat: add --help integration test (#5434)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-10 15:23:24 +00:00
Joe Previte 11b2ef9846
feat: add test for EXTENSIONS_GALLERY (#5432)
* refactor: add env arg to runCodeServerCommand

This allows yous to pass environment variables to code-server's helper
when running integration tests.

* feat: add EXTENSIONS_GALLERY integration test

This test ensures EXTENSIONS_GALLERY is read when set and using the
`--install-extension` flag.

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-09 20:41:37 +00:00
Joe Previte 1296848afc
refactor: switch to codecov-uploader GitHub Action (#5303)
* refactor: switch to codecov-uploader GitHub Action

codecov deprecated their Node wrapper for uploading coverage reports.

This removes that and uses their new uploaded along with the v2 GitHub
Action they maintain.

* fix: update broken integration test
2022-06-28 10:04:35 -07:00
Joe Previte c51ff3bce1
refactor: move integration tests to Jest (#5275)
* feat: add installExtension integration test

This adds a new helper function called `runCodeServerCommand` along with
a test for `--install-extension`. We can use this approach for writing
integration tests (i.e. testing a real code-server build, CLI commands,
etc).

* refactor: s/ test:standalone with test:integration

This replaces our integration approach to use Jest instead of a single
bash script. By doing this, we will be able to easily maintain and add
to our integration test suite.

* refactor: filter unit tests

Now that our integration tests also use Jest, we need to update our unit
test script to ignore `test/integration`.

* refactor: add SKIP_SUBMODULE_DEPS to postinstall

* refactor: add SKIP_SUBMODULE_DEPS to postinstall

* fixup!: skip submod deps

* refactor: move runCodeServerCommand into sep. file

When Jest runs a test, it loads all the files and imports for that test.
This means you might be "requiring" code that's unrelated to your tests.

This leads to unexpected errors depending on where the code runs.

Moved this file to avoid GLIBC and other errors relaed to argon2 when
running integration tests in CI.

* fizup: formatting

* fizup: increase timeout

* refactor: use fixture in installExtension test

Instead of relying on a network to install an extension, we use a
fixture - vsix file in the repo. This is also faster.

* feat: add integration test for listExtensions

* chore: ignore integration fixtures

* fixup: formatting

* fixup: remove custom-hacks.css

* fixup: formatting

* Update test/integration/installExtension.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/installExtension.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* fixup: contributing integration tests section

* fixup: update ci/readme

* fixup: use RELEASE_PATH in test-integration.sh

* refactor: unzip vsix for listExtensions

* refactor: use exec instead of spawn

* Update docs/CONTRIBUTING.md

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* refactor: use different default binary path

* fixup!: formatting

Co-authored-by: Asher <ash@coder.com>
2022-06-24 16:33:38 +00:00