Skip to content

Commit

Permalink
Make kanikotest skip on environment using scc
Browse files Browse the repository at this point in the history
The TestKanikoTaskRun needs priviledged access or
needs to be run as root user on platform like
OpenShift. This will add a flag which can be
passed in go test and test can be skipped
  • Loading branch information
piyush-garg authored and tekton-robot committed Nov 13, 2019
1 parent ffadda1 commit 224401c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/kaniko_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,16 @@ const (
revision = "1c9d566ecd13535f93789595740f20932f655905"
)

var (
skipRootUserTests = "false"
)

// TestTaskRun is an integration test that will verify a TaskRun using kaniko
func TestKanikoTaskRun(t *testing.T) {
if skipRootUserTests == "true" {
t.Skip("Skip test as skipRootUserTests set to true")
}

c, namespace := setup(t, withRegistry)
t.Parallel()

Expand Down

0 comments on commit 224401c

Please sign in to comment.