mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-21 22:47:49 +00:00
71d24d6e33
The previous implementation in #2170 of parsing the container status was too general, because it relied on the mistaken assumption that a container would have a status of `Stopped` if it was manually stopped. This turned out to be untrue, as manually stopped containers were also getting restarted by the Supervisor due to their inspect status of `exited`. With this, parsing the exit message became unavoidable as there are no other clear ways to discern a container that has been manually stopped and shouldn't be started from a container experiencing the Engine-host race condition issue (again, see #2170). Since we're just parsing the exit error message, we don't need to worry about different behaviors amongst restart policies, as any container with the error message on exit should be started. Change-type: patch Closes: #2178 Signed-off-by: Christina Ying Wang <christina@balena.io>
15 lines
347 B
TypeScript
15 lines
347 B
TypeScript
import { expect } from 'chai';
|
|
import * as ComposeUtils from '~/src/compose/utils';
|
|
|
|
describe('compose/utils', () => {
|
|
it('should correctly camel case the configuration', () => {
|
|
const config = {
|
|
networks: ['test', 'test2'],
|
|
};
|
|
|
|
expect(ComposeUtils.camelCaseConfig(config)).to.deep.equal({
|
|
networks: ['test', 'test2'],
|
|
});
|
|
});
|
|
});
|