Sonar complience

Use valid names and factorize some constants checks
This commit is contained in:
2024-10-18 09:34:57 +02:00
parent d2c8d08b7f
commit 533e1422d0
8 changed files with 37 additions and 36 deletions

View File

@@ -25,7 +25,7 @@ services:
os.Chdir(tmpDir)
defer os.Chdir(currentDir)
output := _compile_test(t, "-s", webTemplateOutput)
output := internalCompileTest(t, "-s", webTemplateOutput)
// dt := DeploymentTest{}
dt := v1.Deployment{}
@@ -67,7 +67,7 @@ services:
os.Chdir(tmpDir)
defer os.Chdir(currentDir)
output := _compile_test(t, "-s", webTemplateOutput)
output := internalCompileTest(t, "-s", webTemplateOutput)
dt := v1.Deployment{}
if err := yaml.Unmarshal([]byte(output), &dt); err != nil {
t.Errorf(unmarshalError, err)
@@ -125,7 +125,7 @@ services:
os.Chdir(tmpDir)
defer os.Chdir(currentDir)
output := _compile_test(t, "-s", webTemplateOutput)
output := internalCompileTest(t, "-s", webTemplateOutput)
dt := v1.Deployment{}
if err := yaml.Unmarshal([]byte(output), &dt); err != nil {
t.Errorf(unmarshalError, err)
@@ -167,7 +167,7 @@ services:
os.Chdir(tmpDir)
defer os.Chdir(currentDir)
output := _compile_test(t, "-s", webTemplateOutput)
output := internalCompileTest(t, "-s", webTemplateOutput)
dt := v1.Deployment{}
if err := yaml.Unmarshal([]byte(output), &dt); err != nil {
t.Errorf(unmarshalError, err)
@@ -220,7 +220,7 @@ services:
os.Chdir(tmpDir)
defer os.Chdir(currentDir)
output := _compile_test(t, "-s", webTemplateOutput)
output := internalCompileTest(t, "-s", webTemplateOutput)
dt := v1.Deployment{}
if err := yaml.Unmarshal([]byte(output), &dt); err != nil {
t.Errorf(unmarshalError, err)
@@ -257,7 +257,7 @@ services:
os.Chdir(tmpDir)
defer os.Chdir(currentDir)
output := _compile_test(t, "-s", webTemplateOutput)
output := internalCompileTest(t, "-s", webTemplateOutput)
dt := v1.Deployment{}
if err := yaml.Unmarshal([]byte(output), &dt); err != nil {
t.Errorf(unmarshalError, err)
@@ -303,7 +303,7 @@ services:
os.Chdir(tmpDir)
defer os.Chdir(currentDir)
output := _compile_test(t, "-s", webTemplateOutput)
output := internalCompileTest(t, "-s", webTemplateOutput)
dt := v1.Deployment{}
if err := yaml.Unmarshal([]byte(output), &dt); err != nil {
t.Errorf(unmarshalError, err)