diff --git a/test/local/commands/push-monorepo.test.ts b/test/local/commands/push-monorepo.test.ts index 0b12f7e36..f58be8ca0 100644 --- a/test/local/commands/push-monorepo.test.ts +++ b/test/local/commands/push-monorepo.test.ts @@ -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'); }); diff --git a/test/local/lib/runtime-source-context.test.ts b/test/local/lib/runtime-source-context.test.ts index 8bec1d357..1dd04a9af 100644 --- a/test/local/lib/runtime-source-context.test.ts +++ b/test/local/lib/runtime-source-context.test.ts @@ -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', }); });