Skip to content

Commit

Permalink
Remove dupliated (depcreated) tests 💀
Browse files Browse the repository at this point in the history
In #1311 I removed support for `${}` but instead of removing these tests
I just updated them, making them duplicates of the above test cases.
  • Loading branch information
bobcatfish committed Dec 6, 2019
1 parent efbcf9d commit 62cf103
Showing 1 changed file with 0 additions and 95 deletions.
95 changes: 0 additions & 95 deletions pkg/reconciler/taskrun/resources/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,101 +747,6 @@ func TestVolumeReplacement(t *testing.T) {
},
}},
},
}, {
name: "deprecated volume replacement",
ts: &v1alpha1.TaskSpec{
Volumes: []corev1.Volume{{
Name: "$(foo)",
}},
},
repl: map[string]string{"foo": "bar"},
want: &v1alpha1.TaskSpec{
Volumes: []corev1.Volume{{
Name: "bar",
}},
},
}, {
name: "deprecated volume configmap",
ts: &v1alpha1.TaskSpec{
Volumes: []corev1.Volume{{
Name: "$(name)",
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: "$(configmapname)",
},
},
}},
},
},
repl: map[string]string{
"name": "myname",
"configmapname": "cfgmapname",
},
want: &v1alpha1.TaskSpec{
Volumes: []corev1.Volume{{
Name: "myname",
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: "cfgmapname",
},
},
}},
},
},
}, {
name: "deprecated volume secretname",
ts: &v1alpha1.TaskSpec{
Volumes: []corev1.Volume{{
Name: "$(name)",
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: "$(secretname)",
},
}},
},
},
repl: map[string]string{
"name": "mysecret",
"secretname": "totallysecure",
},
want: &v1alpha1.TaskSpec{
Volumes: []corev1.Volume{{
Name: "mysecret",
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: "totallysecure",
},
}},
},
},
}, {
name: "deprecated volume PVC name",
ts: &v1alpha1.TaskSpec{
Volumes: []corev1.Volume{{
Name: "$(name)",
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: "$(FOO)",
},
},
}},
},
repl: map[string]string{
"name": "mypvc",
"FOO": "pvcrocks",
},
want: &v1alpha1.TaskSpec{
Volumes: []corev1.Volume{{
Name: "mypvc",
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: "pvcrocks",
},
},
}},
},
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 62cf103

Please sign in to comment.