Skip to content

Commit

Permalink
add namespace to GetDownloadSteps
Browse files Browse the repository at this point in the history
Signed-off-by: cappyzawa <[email protected]>

add namespace as cluser3's parameter to input_resource_test

Signed-off-by: cappyzawa <[email protected]>
  • Loading branch information
cappyzawa authored and tekton-robot committed Sep 5, 2019
1 parent 840d10a commit 0d175f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/cluster_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func Test_ClusterResource_GetDownloadSteps(t *testing.T) {
Name: "kubeconfig-9l9zj",
Image: "override-with-kubeconfig-writer:latest",
Command: []string{"/ko-app/kubeconfigwriter"},
Args: []string{"-clusterConfig", `{"name":"test-cluster-resource","type":"cluster","url":"http://10.10.10.10","revision":"","username":"","password":"","token":"","Insecure":false,"cadata":null,"secrets":[{"fieldName":"cadata","secretKey":"cadatakey","secretName":"secret1"}]}`},
Args: []string{"-clusterConfig", `{"name":"test-cluster-resource","type":"cluster","url":"http://10.10.10.10","revision":"","username":"","password":"","namespace":"","token":"","Insecure":false,"cadata":null,"secrets":[{"fieldName":"cadata","secretKey":"cadatakey","secretName":"secret1"}]}`},
Env: []corev1.EnvVar{{
Name: "CADATA",
ValueFrom: &corev1.EnvVarSource{
Expand Down
7 changes: 5 additions & 2 deletions pkg/reconciler/taskrun/resources/input_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ func setUp(t *testing.T) {
}, {
Name: "Url",
Value: "http://10.10.10.10",
}, {
Name: "Namespace",
Value: "namespace1",
}, {
Name: "CAdata",
// echo "my-ca-cert" | base64
Expand Down Expand Up @@ -639,7 +642,7 @@ func TestAddResourceToTask(t *testing.T) {
Image: "override-with-kubeconfig-writer:latest",
Command: []string{"/ko-app/kubeconfigwriter"},
Args: []string{
"-clusterConfig", `{"name":"cluster3","type":"cluster","url":"http://10.10.10.10","revision":"","username":"","password":"","token":"","Insecure":false,"cadata":"bXktY2EtY2VydAo=","secrets":null}`,
"-clusterConfig", `{"name":"cluster3","type":"cluster","url":"http://10.10.10.10","revision":"","username":"","password":"","namespace":"namespace1","token":"","Insecure":false,"cadata":"bXktY2EtY2VydAo=","secrets":null}`,
},
}}},
},
Expand Down Expand Up @@ -681,7 +684,7 @@ func TestAddResourceToTask(t *testing.T) {
Image: "override-with-kubeconfig-writer:latest",
Command: []string{"/ko-app/kubeconfigwriter"},
Args: []string{
"-clusterConfig", `{"name":"cluster2","type":"cluster","url":"http://10.10.10.10","revision":"","username":"","password":"","token":"","Insecure":false,"cadata":null,"secrets":[{"fieldName":"cadata","secretKey":"cadatakey","secretName":"secret1"}]}`,
"-clusterConfig", `{"name":"cluster2","type":"cluster","url":"http://10.10.10.10","revision":"","username":"","password":"","namespace":"","token":"","Insecure":false,"cadata":null,"secrets":[{"fieldName":"cadata","secretKey":"cadatakey","secretName":"secret1"}]}`,
},
Env: []corev1.EnvVar{{
ValueFrom: &corev1.EnvVarSource{
Expand Down

0 comments on commit 0d175f2

Please sign in to comment.