mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-04-19 10:15:44 +00:00
Revert convert to esm (#544)
* Revert "update got dependency and convert to esm module (#533)"
This reverts commit 77efb36ae3.
* keep new local test file changes
* keep changes to PR template
* update changelog
This commit is contained in:
parent
ee41aa2fcf
commit
66531b2752
39 changed files with 14341 additions and 12232 deletions
|
|
@ -1,18 +1,17 @@
|
|||
import { vi, describe, test, expect } from 'vitest';
|
||||
|
||||
vi.mock('@actions/core');
|
||||
import core from '@actions/core';
|
||||
import rsasign from 'jsrsasign';
|
||||
import {
|
||||
jest.mock('@actions/core');
|
||||
jest.mock('@actions/core/lib/command');
|
||||
const core = require('@actions/core');
|
||||
const rsasign = require('jsrsasign');
|
||||
const {
|
||||
privateRsaKey,
|
||||
privateRsaKeyBase64,
|
||||
publicRsaKey
|
||||
} from './rsa_keys.js';
|
||||
} = require('./rsa_keys');
|
||||
|
||||
import got from 'got';
|
||||
import { when } from 'jest-when'
|
||||
const got = require('got');
|
||||
const { when } = require('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 || '8200'}`;
|
||||
const vaultToken = `${process.env.VAULT_TOKEN || 'testtoken'}`
|
||||
|
|
@ -140,7 +139,7 @@ describe('jwt auth', () => {
|
|||
|
||||
describe('authenticate with private key', () => {
|
||||
beforeEach(() => {
|
||||
vi.resetAllMocks();
|
||||
jest.resetAllMocks();
|
||||
|
||||
when(core.getInput)
|
||||
.calledWith('url', expect.anything())
|
||||
|
|
@ -190,7 +189,7 @@ describe('jwt auth', () => {
|
|||
})
|
||||
|
||||
beforeEach(() => {
|
||||
vi.resetAllMocks();
|
||||
jest.resetAllMocks();
|
||||
|
||||
when(core.getInput)
|
||||
.calledWith('url', expect.anything())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue