Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
fix: remove specific tests, remove planBuild from test
  • Loading branch information
plyr4 committed Nov 29, 2022
commit c18947b07c2aa5f03c7bad325126afebe9c69711
2 changes: 1 addition & 1 deletion executor/linux/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func (c *client) AssembleBuild(ctx context.Context) error {
continue
}

// ignore secret origins coming from plugins
// skip over non-plugin secrets origins
if container.Empty() {
continue
}
Expand Down
33 changes: 0 additions & 33 deletions executor/linux/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,34 +591,6 @@ func TestLinux_AssembleBuild_EnforceTrustedRepos(t *testing.T) {
},
}

// focus these tests
tests = []struct {
name string
failure bool
build *library.Build
repo *library.Repo
pipeline string
privilegedImages []string
enforceTrustedRepos bool
}{{
name: "enforce trusted repos enabled: privileged steps pipeline with untrusted repo and init step name",
failure: true,
build: _build,
repo: _untrustedRepo,
pipeline: "testdata/build/steps/name_init.yml",
privilegedImages: _privilegedImagesStepsPipeline, // this matches the image from test.pipeline
enforceTrustedRepos: true,
},
{
name: "enforce trusted repos enabled: non-privileged steps pipeline with untrusted repo and init step name",
failure: true,
build: _build,
repo: _untrustedRepo,
pipeline: "testdata/build/steps/name_init.yml",
privilegedImages: _privilegedImagesStepsPipeline, // this matches the image from test.pipeline
enforceTrustedRepos: true,
}}

// run test
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
Expand Down Expand Up @@ -652,11 +624,6 @@ func TestLinux_AssembleBuild_EnforceTrustedRepos(t *testing.T) {
t.Errorf("CreateBuild returned err: %v", err)
}

err = _engine.PlanBuild(context.Background())
if err != nil {
t.Errorf("PlanBuild returned err: %v", err)
}

err = _engine.AssembleBuild(context.Background())

if test.failure {
Expand Down