Fixed e2e tests

This commit is contained in:
Jakub Al-Khalili
2019-07-08 15:11:12 +02:00
parent 05a446e4a2
commit 5e22cdfdce
4 changed files with 20 additions and 20 deletions
+14 -16
View File
@@ -40,31 +40,29 @@ func TestConfiguration(t *testing.T) {
RepositoryURL: "https://github.com/jenkinsci/kubernetes-operator.git",
},
}
volumes := []corev1.Volume{
{
Name: "test-configmap",
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: userConfigurationConfigMapName,
},
},
groovyScripts := v1alpha2.GroovyScripts{
Customization: v1alpha2.Customization{
Configurations: []v1alpha2.ConfigMapRef{
{userConfigurationConfigMapName},
},
Secret:v1alpha2.SecretRef{userConfigurationSecretName },
},
{
Name: "test-secret",
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: userConfigurationSecretName,
},
}
casc := v1alpha2.ConfigurationAsCode{
Customization: v1alpha2.Customization{
Configurations: []v1alpha2.ConfigMapRef{
{userConfigurationConfigMapName},
},
Secret:v1alpha2.SecretRef{userConfigurationSecretName },
},
}
// base
createUserConfigurationSecret(t, namespace, systemMessageEnvName, systemMessage)
createUserConfigurationConfigMap(t, namespace, numberOfExecutors, fmt.Sprintf("${%s}", systemMessageEnvName))
jenkins := createJenkinsCR(t, jenkinsCRName, namespace, &[]v1alpha2.SeedJob{mySeedJob.SeedJob}, volumes)
jenkins := createJenkinsCR(t, jenkinsCRName, namespace, &[]v1alpha2.SeedJob{mySeedJob.SeedJob}, groovyScripts, casc)
createDefaultLimitsForContainersInNamespace(t, namespace)
createKubernetesCredentialsProviderSecret(t, namespace, mySeedJob)
waitForJenkinsBaseConfigurationToComplete(t, jenkins)