Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/local/commands/push-monorepo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ describe('apify push of a monorepo Actor to a local Actor runtime', () => {
expect(names).not.toContain('packages/typescript-utils/src/index.ts');
// Untracked and not ignored: pushed, with a warning that the platform would not have it yet.
expect(names).toContain('shared/start.sh');
expect(modes.get('shared/start.sh')).toBe(0o755);
// Windows has no execute bit, so chmod cannot set one and the tarball records the default mode.
if (process.platform !== 'win32') expect(modes.get('shared/start.sh')).toBe(0o755);
expect(logMessages.error.join('\n')).toContain('changes that are not committed');
});

Expand Down
10 changes: 6 additions & 4 deletions test/local/lib/runtime-source-context.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { join } from 'node:path';
import { join, resolve } from 'node:path';

import { resolveDockerContext } from '../../../src/lib/runtime/source-context.js';

const actorDir = join('/repo', 'actors', 'a');
// `resolve`, not `join`: on Windows the resolved context carries the drive (`D:\repo`), as the command resolves it.
const repoDir = resolve('/repo');
const actorDir = join(repoDir, 'actors', 'a');

describe('resolveDockerContext', () => {
it('resolves dockerContextDir relative to the .actor folder', () => {
// Outside a Git repository, the context itself is what is pushed.
expect(resolveDockerContext(actorDir, '../../..')).toEqual({
kind: 'context',
contextRoot: join('/repo'),
sourceRoot: join('/repo'),
contextRoot: repoDir,
sourceRoot: repoDir,
actorPath: 'actors/a',
});
});
Expand Down
Loading