From 5a45dca14c746bdc6a8b5a3849f94a935a220ad5 Mon Sep 17 00:00:00 2001 From: joeyyy09 Date: Sun, 11 Aug 2024 10:49:09 +0530 Subject: [PATCH] Lint Fixes Signed-off-by: joeyyy09 --- cmd/jaeger/internal/integration/kafka_test.go | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/cmd/jaeger/internal/integration/kafka_test.go b/cmd/jaeger/internal/integration/kafka_test.go index c8a030a23ed..a069488fa03 100644 --- a/cmd/jaeger/internal/integration/kafka_test.go +++ b/cmd/jaeger/internal/integration/kafka_test.go @@ -14,25 +14,25 @@ import ( ) func modifyConfigEncoding(t *testing.T, configFile string, encoding string) string { - data, err := os.ReadFile(configFile) - require.NoError(t, err) - - var config map[string]interface{} - err = yaml.Unmarshal(data, &config) - require.NoError(t, err) - - exporters := config["exporters"].(map[string]interface{}) - kafka := exporters["kafka"].(map[string]interface{}) - kafka["encoding"] = encoding - - newData, err := yaml.Marshal(config) - require.NoError(t, err) - - tempFile := filepath.Join(t.TempDir(), "modified_config.yaml") - err = os.WriteFile(tempFile, newData, 0600) - require.NoError(t, err) - - return tempFile + data, err := os.ReadFile(configFile) + require.NoError(t, err) + + var config map[string]interface{} + err = yaml.Unmarshal(data, &config) + require.NoError(t, err) + + exporters := config["exporters"].(map[string]interface{}) + kafka := exporters["kafka"].(map[string]interface{}) + kafka["encoding"] = encoding + + newData, err := yaml.Marshal(config) + require.NoError(t, err) + + tempFile := filepath.Join(t.TempDir(), "modified_config.yaml") + err = os.WriteFile(tempFile, newData, 0o600) + require.NoError(t, err) + + return tempFile } func TestKafkaStorage(t *testing.T) { @@ -80,7 +80,7 @@ func TestKafkaStorage(t *testing.T) { // Test legacy Jaeger formats t.Run("LegacyJaegerFormats", func(t *testing.T) { legacyCollectorConfig := modifyConfigEncoding(t, baseCollectorConfig, "jaeger_json") - legacyIngesterConfig := modifyConfigEncoding(t, baseIngesterConfig, "jaeger_json") + legacyIngesterConfig := modifyConfigEncoding(t, baseIngesterConfig, "jaeger_json") collector := &E2EStorageIntegration{ SkipStorageCleaner: true, ConfigFile: legacyCollectorConfig,