Skip to content

Commit 73ea6d4

Browse files
BLaZeKiLLwebbertakken
authored andcommitted
repo version hard codded, fixed tests accordingly
1 parent 8cf1c90 commit 73ea6d4

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

action/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/model/docker.test.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@ describe('Docker', () => {
66
it('builds', async () => {
77
const path = Action.actionFolder;
88
const dockerfile = `${path}/Dockerfile`;
9-
const baseImage = new ImageTag({
9+
const image = new ImageTag({
1010
repository: '',
1111
name: 'alpine',
1212
version: '3',
1313
});
1414

15+
const baseImage = {
16+
toString: () => image.toString().slice(0, image.toString().lastIndexOf('-')),
17+
version: image.version,
18+
};
19+
1520
const tag = await Docker.build({ path, dockerfile, baseImage }, true);
1621

1722
expect(tag).toBeInstanceOf(ImageTag);
18-
expect(tag.toString()).toStrictEqual('unity-action:3');
23+
expect(tag.toString()).toStrictEqual('unity-action:3-0');
1924
}, 240000);
2025
});

src/model/image-tag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ImageTag {
3434
}
3535

3636
toString() {
37-
return `${this.image}:${this.tag}`;
37+
return `${this.image}:${this.tag}-0`;
3838
}
3939
}
4040

src/model/image-tag.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('UnityImageVersion', () => {
3232
it('returns the correct version', () => {
3333
const image = ImageTag.createForBase('2099.1.1111');
3434

35-
expect(image.toString()).toStrictEqual(`unityci/editor:2099.1.1111`);
35+
expect(image.toString()).toStrictEqual(`unityci/editor:2099.1.1111-0`);
3636
});
3737
});
3838
});

0 commit comments

Comments
 (0)