Skip to content

Commit

Permalink
increase test timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
  • Loading branch information
vvoland committed Oct 18, 2024
1 parent a74c891 commit 29f6d0a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion __tests__/docker/install.test.itg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ aarch64:https://cloud.debian.org/images/cloud/bookworm/20231013-1532/debian-12-g
await Docker.printInfo();
await install.tearDown();
})()).resolves.not.toThrow();
}, 1200000);
}, 30 * 60 * 1000);
});
14 changes: 9 additions & 5 deletions src/docker/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,22 @@ provision:
https://raw.githubusercontent.com/moby/moby/v{{srcImageTag}}/contrib/init/systemd/docker.socket \
-O /etc/systemd/system/docker.socket || true
mount
ls -lah /tmp/lima || true
ls -lah {{toolDir}} || true
mkdir -p /usr/local/bin
cp /tmp/lima/* /usr/local/bin/
cp {{toolDir}}/* /usr/local/bin/
sed -i 's|^ExecStart=.*|ExecStart=/usr/local/bin/dockerd -H fd://|' /etc/systemd/system/docker.service
sed -i 's|containerd.service||' /etc/systemd/system/docker.service
if ! getent group docker; then
groupadd --system docker
fi
systemctl daemon-reload
if ! systemctl enable --now docker; then
systemctl status docker.socket
systemctl status docker.service
fi
systemctl enable --now docker
systemctl status docker.socket || true
systemctl status docker.service || true
fi
probes:
Expand Down
6 changes: 5 additions & 1 deletion src/docker/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {Util} from '../util';
import {limaYamlData, dockerServiceLogsPs1, setupDockerWinPs1} from './assets';
import {GitHubRelease} from '../types/github';
import {HubRepository} from '../hubRepository';
import {randomUUID} from 'node:crypto';

export interface InstallSourceImage {
type: 'image';
Expand Down Expand Up @@ -202,10 +203,13 @@ export class Install {

// this.toolDir is a very long path which causes trouble when mounting it in lima.
// Copy it to a shorter path.
const limaToolsDir = '/tmp/lima';
// Random path
await io.mkdirP('/tmp/lima');
const limaToolsDir = '/tmp/lima/' + randomUUID();

await core.group('Copy tools', async () => {
await Exec.exec('cp', ['-rv', this.toolDir, limaToolsDir]);
await Exec.exec('ls', ['-lah', limaToolsDir]);
});

// avoid brew to auto update and upgrade unrelated packages.
Expand Down

0 comments on commit 29f6d0a

Please sign in to comment.