Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions pkg/apis/pipeline/v1/container_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,43 @@ func TestStepValidateErrorWithArtifactsRef(t *testing.T) {
}
}

func TestStepWithStepActionReferenceValidate(t *testing.T) {
tests := []struct {
name string
Step v1.Step
}{{
name: "valid stepAction ref",
Step: v1.Step{
Name: "mystep",
Ref: &v1.Ref{
Name: "stepAction",
},
},
}, {
name: "valid use of params with Ref",
Step: v1.Step{
Ref: &v1.Ref{
Name: "stepAction",
},
Params: v1.Params{{
Name: "param",
}},
},
}}
for _, st := range tests {
t.Run(st.name, func(t *testing.T) {
ctx := config.ToContext(t.Context(), &config.Config{
FeatureFlags: &config.FeatureFlags{
EnableStepActions: true,
},
})
if err := st.Step.Validate(ctx); err != nil {
t.Errorf("Step.Validate() = %v", err)
}
})
}
}

func TestSidecarValidate(t *testing.T) {
tests := []struct {
name string
Expand Down
Loading