Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sonar-scanner): Allow users to specify the dotnet-scanner version #486

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
fix: Remove dependecy on os module
sasjo committed Jun 20, 2022
commit ce741b52495c9e681bf4cd791d7ea7ce19debb17
9 changes: 3 additions & 6 deletions setup-gcloud/test/setup-gcloud.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const path = require('path');

const mockFs = require('mock-fs');

// Mock out tools download
@@ -10,7 +12,6 @@ jest.mock('@actions/core');

const core = require('@actions/core');
const exec = require('@actions/exec');
const os = require('os');
const setupGcloud = require('../src/setup-gcloud');

const jsonKey = {
@@ -72,10 +73,6 @@ describe('Setup Gcloud', () => {
exec.exec.mockResolvedValueOnce(0);
await setupGcloud(base64Key, 'latest', true);
expect(core.exportVariable.mock.calls[0][0]).toEqual('GOOGLE_APPLICATION_CREDENTIALS');
if (os.platform() === 'win32') {
expect(core.exportVariable.mock.calls[0][1]).toContain('\\workspace\\');
} else {
expect(core.exportVariable.mock.calls[0][1]).toContain('/workspace/');
}
expect(core.exportVariable.mock.calls[0][1]).toContain(`${path.sep}workspace${path.sep}`);
});
});