reflect linter feedback, remove unused argumnents and redundant type from arrays (#2739)

* reflect linter feedback, remove unused argumnents and redundant literal definitions
* add logical backup to TestCreate unit test
This commit is contained in:
Felix Kunde
2024-08-27 17:56:07 +02:00
committed by GitHub
parent a08d1679f2
commit 2ae51fb9ce
10 changed files with 72 additions and 74 deletions
+5 -3
View File
@@ -71,11 +71,11 @@ var cl = New(
Spec: acidv1.PostgresSpec{
EnableConnectionPooler: util.True(),
Streams: []acidv1.Stream{
acidv1.Stream{
{
ApplicationId: "test-app",
Database: "test_db",
Tables: map[string]acidv1.StreamTable{
"test_table": acidv1.StreamTable{
"test_table": {
EventType: "test-app.test",
},
},
@@ -95,6 +95,7 @@ func TestCreate(t *testing.T) {
client := k8sutil.KubernetesClient{
DeploymentsGetter: clientSet.AppsV1(),
CronJobsGetter: clientSet.BatchV1(),
EndpointsGetter: clientSet.CoreV1(),
PersistentVolumeClaimsGetter: clientSet.CoreV1(),
PodDisruptionBudgetsGetter: clientSet.PolicyV1(),
@@ -111,6 +112,7 @@ func TestCreate(t *testing.T) {
Namespace: clusterNamespace,
},
Spec: acidv1.PostgresSpec{
EnableLogicalBackup: true,
Volume: acidv1.Volume{
Size: "1Gi",
},
@@ -1504,7 +1506,7 @@ func newCronJob(image, schedule string, vars []v1.EnvVar, mounts []v1.VolumeMoun
Template: v1.PodTemplateSpec{
Spec: v1.PodSpec{
Containers: []v1.Container{
v1.Container{
{
Name: "logical-backup",
Image: image,
Env: vars,