mirror of
https://github.com/docker/build-push-action.git
synced 2025-05-06 21:49:33 +02:00
*: report metrics to the VM agent
This commit is contained in:
parent
70572bc121
commit
def1585067
9 changed files with 1497 additions and 19 deletions
|
@ -3,6 +3,7 @@ import * as main from '../main';
|
|||
import * as reporter from '../reporter';
|
||||
import {getDockerfilePath} from '../context';
|
||||
import * as setupBuilder from '../setup_builder';
|
||||
import { Metric_MetricType } from "@buf/blacksmith_vm-agent.bufbuild_es/stickydisk/v1/stickydisk_pb";
|
||||
|
||||
jest.mock('@actions/core', () => ({
|
||||
debug: jest.fn(),
|
||||
|
@ -20,9 +21,14 @@ jest.mock('../context', () => ({
|
|||
Inputs: jest.fn()
|
||||
}));
|
||||
|
||||
jest.mock('../reporter', () => ({
|
||||
reportBuildPushActionFailure: jest.fn().mockResolvedValue(undefined)
|
||||
}));
|
||||
jest.mock('../reporter', () => {
|
||||
const actual = jest.requireActual('../reporter');
|
||||
return {
|
||||
...actual,
|
||||
reportBuildPushActionFailure: jest.fn().mockResolvedValue(undefined),
|
||||
reportMetric: jest.fn().mockImplementation((type: Metric_MetricType) => Promise.resolve())
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock('../setup_builder', () => ({
|
||||
...jest.requireActual('../setup_builder'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue