From e8186e990fd32d0ae9c2315816753af47ba2018d Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 23 Aug 2020 03:36:35 +0200 Subject: [PATCH] Update tests Signed-off-by: CrazyMax --- __tests__/buildx.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/__tests__/buildx.test.ts b/__tests__/buildx.test.ts index 5d0dd13..870a930 100644 --- a/__tests__/buildx.test.ts +++ b/__tests__/buildx.test.ts @@ -1,6 +1,7 @@ import fs from 'fs'; import * as semver from 'semver'; import * as buildx from '../src/buildx'; +import * as exec from '@actions/exec'; const digest = 'sha256:bfb45ab72e46908183546477a08f8867fc40cebadd00af54b071b097aed127a9'; @@ -17,6 +18,7 @@ describe('getImageID', () => { describe('getVersion', () => { it('valid', async () => { + await exec.exec('docker', ['buildx', 'version']); const version = await buildx.getVersion(); console.log(`version: ${version}`); expect(semver.valid(version)).not.toBeNull(); @@ -25,6 +27,7 @@ describe('getVersion', () => { describe('parseVersion', () => { test.each([ + ['github.com/docker/buildx v0.2.2 ab5fe3dec5785b8d0a7d2cf2499c38e504d4c609', '0.2.2'], ['github.com/docker/buildx v0.4.1 bda4882a65349ca359216b135896bddc1d92461c', '0.4.1'], ['github.com/docker/buildx v0.4.2 fb7b670b764764dc4716df3eba07ffdae4cc47b2', '0.4.2'] ])('given %p', async (stdout, expected) => {