Commit Graph

4094 Commits

Author SHA1 Message Date
1867b74bd7 Migrate config module tests to integration
This commit also changes the test:integration command to run integration
tests as different processes. This allows to avoid any test leaking into
each-other because of the use of singletons. This however has the side
effect of tests being slower, but that is a forcing function to refactor
the code.
2022-09-28 10:37:41 -03:00
f835db9509 Migrate legacy db test to integration folder 2022-09-28 10:37:41 -03:00
f19f70d690 Migrate update-lock tests as integration tests
Update-lock tests now use the actual filesystem for testing, instead of
relying on stubs and spies.

This commit also fixes a small bug with update-lock that would cause a
`PromiseRejectionHandledWarning` when the lock callback would throw.
2022-09-28 10:37:41 -03:00
0fb1de2a1a Migrate tests for image manager 2022-09-28 10:37:41 -03:00
b81294431e Migrate compose/app and compose/app-manager tests
compose/app is run as part of the unit test suite
compose/application-manager is run as part of the integration test suite
2022-09-28 10:37:41 -03:00
a69fbf6eac Migrate volume-manager tests to integration
Now the tests are ran against the actual docker engine instead of
against mockerode.

The new tests actually caught a bug in
`volumeManager.removeOrphanedVolumes`, where that function would try to
remove volumes for stopped containers, causing an exception.
This commit also fixes that bug.
2022-09-28 10:37:41 -03:00
18c2f8cec9 Migrate lib/legacy tests to integration tests
This also sets up a dbus container as part of the test environment. This
container exposes a socket that the sut container can use
2022-09-28 10:37:41 -03:00
a4da25c1ef Disable logs globally using mocha hooks 2022-09-28 10:37:41 -03:00
a5a24e6462 Split compose/service tests into unit/integration 2022-09-28 10:37:41 -03:00
cdc9868d29 Split compose/network test in unit/integration
Integration tests are ran in the engine instead of mockerode.
2022-09-28 10:37:40 -03:00
4113dde45d Split compose/volume tests into unit/integration
This also needs to modify the test environment as database migrations
will look for `config.json` in the location given by the variable
`CONFIG_MOUNT_POINT`.

The volume tests now run against the actual docker engine setup via dind

Change-type: patch
2022-09-28 10:37:40 -03:00
7833fa1ff3 Un-skip fs-utils test 2022-09-28 10:37:40 -03:00
a2f9ea17c3 Update mocha-pod to 0.8.x
Newer mocha-pod allows to setup testfs instances at the global
level. This helps the test suite setup as it can guarantee that certain
files will always be available.
2022-09-28 10:37:40 -03:00
dee8680779 v14.2.6 v14.2.6 2022-09-28 00:21:07 +00:00
4863303270 Merge pull request #2033 from balena-os/knex-bug-2032
Fix migrations hardcode to work with knex 0.95.15
2022-09-28 00:19:49 +00:00
bf0d9ee836 Fix migrations hardcode to work with knex 0.95.15
The latest upgrade of knex broke the webpack loader that hardcodes the
migration paths in the built code, that cause supervisors 14.2.3 to
14.2.5 (inclusive) to break anytime migrations needed to be ran (see linked issue).

This commit fixes the loader to work with the included knex version.

Relates-to: #2032
Change-type: patch
2022-09-27 19:28:32 -03:00
e1b12c28fe v14.2.5 v14.2.5 2022-09-27 04:50:53 +00:00
bbcabc3bdc Merge pull request #2029 from balena-os/docs/clarify-testing-after-updates
Add test troubleshooting case that appears after upgrading system
2022-09-27 04:49:39 +00:00
c6d5ad7a89 Add test troubleshooting case that appears after upgrading system
The error may be something to the effect of `failed to add the host
(vethd6242de) <=> sandbox (veth8e47b1a) pair interfaces: operation not supported`.

Change-type: patch
Signed-off-by: Christina Ying Wang <christina@balena.io>
2022-09-26 20:05:53 -07:00
1e84f8f59f v14.2.4 v14.2.4 2022-09-26 20:17:29 +00:00
e783be2fa4 Merge pull request #2028 from balena-os/custom_finalize
Add custom flowzone action to finalize staging releases
2022-09-26 20:15:50 +00:00
6c1a9cadb2 v14.2.3 v14.2.3 2022-09-26 19:24:16 +00:00
4d515fe51f Merge pull request #2030 from balena-os/knex
Update dependencies to fix NPM build
2022-09-26 19:22:40 +00:00
943004cf43 Add custom flowzone action to finalize staging releases
Change-type: patch
2022-09-26 18:36:55 +00:00
460659429d Update dependencies to fix NPM build
Change-type: patch
2022-09-26 15:26:48 -03:00
9f8929aa42 v14.2.2 v14.2.2 2022-09-22 21:42:18 +00:00
d183d0e3e1 Merge pull request #2023 from balena-os/webpack-5
Update to webpack 5
2022-09-22 21:40:53 +00:00
e8baa63fdd Update typescript target to es2021
Change-type: patch
2022-09-22 21:07:44 +01:00
47dca8604b Update to webpack 5
Change-type: patch
2022-09-22 21:07:44 +01:00
0e053b6706 v14.2.1 v14.2.1 2022-09-22 20:07:29 +00:00
90a9d6e738 Merge pull request #2025 from balena-os/custom-publish
Publish to staging with a custom publish composite job
2022-09-22 21:06:13 +01:00
29ae778e39 Publish to staging with a custom publish composite job
Change-type: patch
2022-09-22 18:58:55 +01:00
ac1fa4d491 v14.2.0 v14.2.0 2022-09-20 17:55:22 +00:00
437a24e2f1 Merge pull request #1989 from balena-os/disable-events
Disable event tracking
2022-09-20 17:54:06 +00:00
b207c01988 Fix livepush to work with node 16
This also improves the memory efficiency of the sync mechanism by
calculating the stage ids on the fly instead of storing the full
build output in memory and then parsing the string.
2022-09-20 14:23:21 -03:00
b168cc35a0 Remove mixpanel configurations
Mixpanel configurations and packages are no longer used. This removes
deadcode from the supervisor.
2022-09-20 14:22:24 -03:00
e00687408c Disable event tracking
The supervisor used to rely on specific event reporting for identifying
issues at runtime. As the platform has grown, it has become much more
difficult to get any signal from the event noise. Recently the API side
for these events has been disabled, meaning these events only
contribute to bandwidth consumption.  This commit disables the
event reporting feature of the supervisor which will be most likely
replaced by something like Sentry in the near future.

Change-type: minor
2022-09-20 14:19:26 -03:00
43bf7a504e v14.1.3 v14.1.3 2022-09-20 13:49:12 +00:00
bf3caa45b9 Merge pull request #2022 from balena-os/update-webpack
Update webpack
2022-09-20 13:47:43 +00:00
93893093ff Update webpack dependencies to latest webpack 4.x compatible versions
Change-type: patch
2022-09-20 14:13:04 +01:00
a8841df5a4 v14.1.2 v14.1.2 2022-09-20 12:57:54 +00:00
4c9e4710ad Merge pull request #2021 from balena-os/update-dev
Update husky/lint-staged dev dependencies
2022-09-20 12:55:41 +00:00
b3d8666997 Update husky/lint-staged dev dependencies
Change-type: patch
2022-09-20 12:52:26 +01:00
ade6513c66 v14.1.1 v14.1.1 2022-09-19 21:21:53 +00:00
4165eef8d4 Merge pull request #2019 from balena-os/uuid-9
Update balena-register-device to 8.0.0
2022-09-19 21:20:38 +00:00
1baf972e16 Update balena-register-device to 8.0.0
Update balena-register-device from 7.2.0 to 8.0.0

Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2022-09-19 13:41:23 -07:00
181be21d6e v14.1.0 v14.1.0 2022-09-19 20:36:48 +00:00
8752cea372 Merge pull request #2018 from balena-os/nodejs-16
Update to nodejs 16
2022-09-19 20:35:26 +00:00
5518eb17bd Update to nodejs 16
Change-type: minor
2022-09-19 17:51:48 +01:00
7c6eadbb6c v14.0.26 v14.0.26 2022-09-19 16:37:43 +00:00