Skip to content

Commit 1f2fbd1

Browse files
Scotttekton-robot
authored andcommitted
Add a clarifying comment to new workspace test
The purpose of a new workspace test was somewhat ambiguous. This commit adds clarifying comments to help future readers of the test code figure out what the meaning of the success condition is.
1 parent b16369e commit 1f2fbd1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/workspace_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ func TestWorkspacePipelineRunMissingWorkspaceInvalid(t *testing.T) {
236236
}
237237
}
238238

239+
// TestWorkspaceVolumeNameMatchesVolumeVariableReplacement checks that a workspace's
240+
// randomized volume name matches the workspaces.<name>.volume variable injected into
241+
// a user's task specs.
239242
func TestWorkspaceVolumeNameMatchesVolumeVariableReplacement(t *testing.T) {
240243
c, namespace := setup(t)
241244

@@ -311,6 +314,7 @@ func TestWorkspaceVolumeNameMatchesVolumeVariableReplacement(t *testing.T) {
311314
volumeNames := []string{}
312315
for _, volume := range p.Spec.Volumes {
313316
if volume.Name == workspaceVariableValue {
317+
// Success: the volume's generated name matches the workspace.<name>.volume variable.
314318
return
315319
}
316320
volumeNames = append(volumeNames, volume.Name)

0 commit comments

Comments
 (0)