mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-04-11 22:50:05 +00:00
Revert "update got dependency and convert to esm module (#533)"
This reverts commit 77efb36ae3.
This commit is contained in:
parent
ee41aa2fcf
commit
e64032b55d
39 changed files with 14350 additions and 12246 deletions
|
|
@ -1,12 +1,11 @@
|
|||
import { vi, describe, test, expect } from 'vitest';
|
||||
jest.mock('@actions/core');
|
||||
jest.mock('@actions/core/lib/command');
|
||||
const core = require('@actions/core');
|
||||
|
||||
vi.mock('@actions/core');
|
||||
import core from '@actions/core';
|
||||
const got = require('got');
|
||||
const { when } = require('jest-when');
|
||||
|
||||
import got from 'got';
|
||||
import { when } from 'jest-when'
|
||||
|
||||
import { exportSecrets } from '../../src/action.js';
|
||||
const { exportSecrets } = require('../../src/action');
|
||||
|
||||
const vaultUrl = `http://${process.env.VAULT_HOST || 'localhost'}:${process.env.VAULT_PORT || '8201'}`;
|
||||
const vaultToken = `${process.env.VAULT_TOKEN || 'testtoken'}`
|
||||
|
|
@ -42,7 +41,7 @@ describe('integration', () => {
|
|||
});
|
||||
|
||||
beforeEach(() => {
|
||||
vi.resetAllMocks();
|
||||
jest.resetAllMocks();
|
||||
|
||||
when(core.getInput)
|
||||
.calledWith('url', expect.anything())
|
||||
|
|
@ -239,7 +238,7 @@ describe('authenticate with approle', () => {
|
|||
});
|
||||
|
||||
beforeEach(() => {
|
||||
vi.resetAllMocks();
|
||||
jest.resetAllMocks();
|
||||
|
||||
when(core.getInput)
|
||||
.calledWith('method', expect.anything())
|
||||
|
|
|
|||
3
integrationTests/enterprise/jest.config.js
Normal file
3
integrationTests/enterprise/jest.config.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
verbose: true
|
||||
};
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
import { defineConfig, configDefaults } from 'vitest/config'
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
// required to make jest-when work with vitest
|
||||
globals: true,
|
||||
include: [
|
||||
'**/integrationTests/enterprise/**.{test,spec}.?(c|m)[jt]s?(x)',
|
||||
],
|
||||
},
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue