Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

Commit

Permalink
ci: fix tests with helm
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Mar 15, 2021
1 parent 6b731e5 commit 1378cb1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 31 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ jobs:
- 10
- 12
- 14
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: azure/setup-helm@v1
- uses: volta-cli/action@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- uses: azure/setup-helm@v1
- run: npm test || true # temporary workaround
- run: npm test

release:
runs-on: ubuntu-latest
Expand Down
23 changes: 1 addition & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"cz-conventional-changelog": "^3.2.0",
"eslint": "^7.6.0",
"eslint-config-prettier": "^8.1.0",
"get-bin-path": "^5.1.0",
"globby": "^11.0.1",
"husky": "^4.2.5",
"jest": "^26.6.3",
Expand Down
3 changes: 2 additions & 1 deletion test/commands/save-image.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe(command, () => {

afterEach(() => {
dir.removeCallback();
shell.cd("-");
});

it("saves an image without tag", () => {
Expand Down Expand Up @@ -72,7 +73,7 @@ describe(command, () => {
it("fails when saving an unexisting image", () => {
const image = "hello-world:123456";

const result = runCommand(`${command} ${image}`);
const result = runCommand(`${command} ${image}`, { reject: false });

expect(result.stdout).toContain(
`Error response from daemon: manifest for ${image} not found: manifest unknown: manifest unknown`
Expand Down
10 changes: 5 additions & 5 deletions test/commands/utils.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as execa from "execa";
import { getBinPathSync } from "get-bin-path";
import * as path from "path";

const bin = getBinPathSync();
const bin = `${path.resolve(`${__dirname}/../../bin/run`)}`;

export const runCommand = (
commandLine: string,
options?: execa.SyncOptions
): execa.ExecaSyncReturnValue =>
execa.commandSync(`${bin} ${commandLine}`, {
): execa.ExecaSyncReturnValue => {
return execa.commandSync(`${bin} ${commandLine}`, {
...options,
reject: false,
});
};

0 comments on commit 1378cb1

Please sign in to comment.