Loading assets/auto-deploy-app/test/templates/cronjob_test.go +22 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,8 @@ func TestCronjobMeta(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -173,6 +175,8 @@ func TestCronjobSchedule(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -236,6 +240,8 @@ func TestCronjobImage(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -376,6 +382,8 @@ func TestCronjobLivenessAndReadiness(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -442,6 +450,8 @@ func TestCronjobNodeSelector(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -531,6 +541,8 @@ func TestCronjobTolerations(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -703,6 +715,8 @@ func TestCronjobTemplateWithVolumeMounts(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -817,6 +831,8 @@ func TestCronjobAffinity(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -893,6 +909,8 @@ func TestCronJobTemplateWithExtraEnvFrom(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) for _, cronjob := range cronjobs.Items { Loading Loading @@ -932,6 +950,8 @@ func TestCronJobTemplateWithSecurityContext(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) for _, cronjob := range cronjobs.Items { Loading Loading @@ -973,6 +993,8 @@ func TestCronJobTemplateWithContainerSecurityContext(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) for _, cronjob := range cronjobs.Items { Loading assets/auto-deploy-app/test/templates/custom-resources.go +3 −0 Original line number Diff line number Diff line package main import ( "regexp" "strings" "testing" Loading Loading @@ -57,6 +58,8 @@ func TestCustomResource(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var renderedObjects []*unstructured.Unstructured helm.UnmarshalK8SYaml(t, output, &renderedObjects) Loading assets/auto-deploy-app/test/templates/db_initialize_job_test.go +3 −0 Original line number Diff line number Diff line package main import ( "regexp" "strings" "testing" Loading Loading @@ -63,6 +64,8 @@ func TestInitializeDatabaseUrlEnvironmentVariable(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, &deployment) Loading assets/auto-deploy-app/test/templates/db_migrate_hook_test.go +3 −0 Original line number Diff line number Diff line package main import ( "regexp" "strings" "testing" Loading Loading @@ -63,6 +64,8 @@ func TestMigrateDatabaseUrlEnvironmentVariable(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, &deployment) Loading assets/auto-deploy-app/test/templates/deployment_test.go +16 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,8 @@ func TestDeploymentTemplate(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var deployment appsV1.Deployment helm.UnmarshalK8SYaml(t, output, &deployment) Loading Loading @@ -1251,6 +1253,8 @@ func TestServiceExtraPortServicePortDefinition(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) require.Equal(t, tc.expectedPorts, deployment.Spec.Template.Spec.Containers[0].Ports) Loading Loading @@ -1413,6 +1417,8 @@ func TestDeploymentTemplateWithVolumeMounts(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) Loading Loading @@ -1489,6 +1495,8 @@ func TestDeploymentDatabaseUrlEnvironmentVariable(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, &deployment) Loading Loading @@ -1566,6 +1574,8 @@ func TestDeploymentTemplateWithExtraEnvFrom(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) require.Contains(t, deployment.Spec.Template.Spec.Containers[0].EnvFrom, tc.expectedEnvFrom) Loading Loading @@ -1607,6 +1617,8 @@ func TestDeploymentTemplateWithExtraEnv(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) require.Contains(t, deployment.Spec.Template.Spec.Containers[0].Env, tc.expectedEnv) Loading Loading @@ -1644,6 +1656,8 @@ func TestDeploymentTemplateWithSecurityContext(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) Loading Loading @@ -1684,6 +1698,8 @@ func TestDeploymentTemplateWithContainerSecurityContext(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) Loading Loading
assets/auto-deploy-app/test/templates/cronjob_test.go +22 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,8 @@ func TestCronjobMeta(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -173,6 +175,8 @@ func TestCronjobSchedule(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -236,6 +240,8 @@ func TestCronjobImage(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -376,6 +382,8 @@ func TestCronjobLivenessAndReadiness(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -442,6 +450,8 @@ func TestCronjobNodeSelector(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -531,6 +541,8 @@ func TestCronjobTolerations(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -703,6 +715,8 @@ func TestCronjobTemplateWithVolumeMounts(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -817,6 +831,8 @@ func TestCronjobAffinity(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading Loading @@ -893,6 +909,8 @@ func TestCronJobTemplateWithExtraEnvFrom(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) for _, cronjob := range cronjobs.Items { Loading Loading @@ -932,6 +950,8 @@ func TestCronJobTemplateWithSecurityContext(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) for _, cronjob := range cronjobs.Items { Loading Loading @@ -973,6 +993,8 @@ func TestCronJobTemplateWithContainerSecurityContext(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) for _, cronjob := range cronjobs.Items { Loading
assets/auto-deploy-app/test/templates/custom-resources.go +3 −0 Original line number Diff line number Diff line package main import ( "regexp" "strings" "testing" Loading Loading @@ -57,6 +58,8 @@ func TestCustomResource(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var renderedObjects []*unstructured.Unstructured helm.UnmarshalK8SYaml(t, output, &renderedObjects) Loading
assets/auto-deploy-app/test/templates/db_initialize_job_test.go +3 −0 Original line number Diff line number Diff line package main import ( "regexp" "strings" "testing" Loading Loading @@ -63,6 +64,8 @@ func TestInitializeDatabaseUrlEnvironmentVariable(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, &deployment) Loading
assets/auto-deploy-app/test/templates/db_migrate_hook_test.go +3 −0 Original line number Diff line number Diff line package main import ( "regexp" "strings" "testing" Loading Loading @@ -63,6 +64,8 @@ func TestMigrateDatabaseUrlEnvironmentVariable(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, &deployment) Loading
assets/auto-deploy-app/test/templates/deployment_test.go +16 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,8 @@ func TestDeploymentTemplate(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") var deployment appsV1.Deployment helm.UnmarshalK8SYaml(t, output, &deployment) Loading Loading @@ -1251,6 +1253,8 @@ func TestServiceExtraPortServicePortDefinition(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) require.Equal(t, tc.expectedPorts, deployment.Spec.Template.Spec.Containers[0].Ports) Loading Loading @@ -1413,6 +1417,8 @@ func TestDeploymentTemplateWithVolumeMounts(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) Loading Loading @@ -1489,6 +1495,8 @@ func TestDeploymentDatabaseUrlEnvironmentVariable(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, &deployment) Loading Loading @@ -1566,6 +1574,8 @@ func TestDeploymentTemplateWithExtraEnvFrom(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) require.Contains(t, deployment.Spec.Template.Spec.Containers[0].EnvFrom, tc.expectedEnvFrom) Loading Loading @@ -1607,6 +1617,8 @@ func TestDeploymentTemplateWithExtraEnv(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) require.Contains(t, deployment.Spec.Template.Spec.Containers[0].Env, tc.expectedEnv) Loading Loading @@ -1644,6 +1656,8 @@ func TestDeploymentTemplateWithSecurityContext(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) Loading Loading @@ -1684,6 +1698,8 @@ func TestDeploymentTemplateWithContainerSecurityContext(t *testing.T) { return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") deployment := new(appsV1.Deployment) helm.UnmarshalK8SYaml(t, output, deployment) Loading