Skip to content

Commit

Permalink
Update tests to remove references to deprecated bundles feature
Browse files Browse the repository at this point in the history
The bundles feature is deprecated, replaced by remote resolution.
As part of this the `pipelineRef.bundle` and `taskRef.bundle` fields
are deprecated.

These tests were originally added to handle the case of runs created
from pipeline / task definitions loaded via bundles, but are not actually
specific to that functionality and cover multiple cases where the
pipeline / task definition is not available separately.

Rename the tests to make this clearer and remove the deprecated fields
which didn't actually impact on the functionality at all.
  • Loading branch information
AlanGreene authored and tekton-robot committed Jul 31, 2023
1 parent 661da6b commit 7a03f4b
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/utils/src/utils/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,25 +433,24 @@ describe('getStepDefinition', () => {
expect(definition).toBeNull();
});

it('handles taskRun using tekton bundle', () => {
const selectedStepId = 'a-bundle-step';
const bundleStep = { name: selectedStepId };
it('handles TaskRun with spec in status.taskSpec', () => {
const selectedStepId = 'a-step';
const step = { name: selectedStepId };
const task = {};
const taskRun = {
spec: {
taskRef: {
bundle: 'index.docker.io/fake/[email protected]',
name: 'dummy-task'
}
},
status: {
taskSpec: {
steps: [bundleStep]
steps: [step]
}
}
};
const definition = getStepDefinition({ selectedStepId, task, taskRun });
expect(definition).toEqual(bundleStep);
expect(definition).toEqual(step);
});
});

Expand Down Expand Up @@ -779,14 +778,13 @@ describe('getTaskRunsWithPlaceholders', () => {
);
});

it('handles pipeline using tekton bundle', () => {
const finallyTaskName = 'bundleFinallyTaskName';
const pipelineTaskName = 'bundlePipelineTaskName';
it('handles PipelineRuns with spec in status.pipelineSpec', () => {
const finallyTaskName = 'aFinallyTaskName';
const pipelineTaskName = 'aPipelineTaskName';

const pipelineRun = {
spec: {
pipelineRef: {
bundle: 'index.docker.io/fake/[email protected]',
name: 'dummy-pipeline'
}
},
Expand Down

0 comments on commit 7a03f4b

Please sign in to comment.