diff --git a/pkg/serdes/avro_serialization_provider.go b/pkg/serdes/avro_serialization_provider.go index f21ef133f4..0b93ef95b9 100644 --- a/pkg/serdes/avro_serialization_provider.go +++ b/pkg/serdes/avro_serialization_provider.go @@ -132,7 +132,7 @@ func (a *AvroSerializationProvider) Serialize(topic, message string) ([]byte, er // Passing the Go native object directly could cause issues during ruleSet execution v, ok := object.(map[string]interface{}) if !ok { - return nil, fmt.Errorf("failed to serialize message: unexpected message type asserion result") + return nil, fmt.Errorf("failed to serialize message: unexpected message type assertion result") } payload, err := a.ser.Serialize(topic, &v) if err != nil { diff --git a/pkg/serdes/serdes_test.go b/pkg/serdes/serdes_test.go index 066f60b790..613210ff87 100644 --- a/pkg/serdes/serdes_test.go +++ b/pkg/serdes/serdes_test.go @@ -215,7 +215,7 @@ func TestAvroSerdesValidWithRuleSet(t *testing.T) { t.Setenv(localKmsSecretMacro, localKmsSecretValueDefault) schemaString := `{"type":"record","name":"myRecord","fields":[{"name":"f1","type":"string","confluent:tags": ["PII"]}]}` - schemaPath := filepath.Join(tempDir, "avro-schema.txt") + schemaPath := filepath.Join(tempDir, "avro-schema-ruleset.txt") req.NoError(os.WriteFile(schemaPath, []byte(schemaString), 0644)) expectedString := `{"f1":"this is a confidential message in AVRO schema"}` @@ -325,7 +325,7 @@ func TestJsonSerdesReference(t *testing.T) { // Prepare main schema information schemaString := `{"type":"object","properties":{"f1":{"$ref":"RefSchema"}},"required":["f1"]}` - schemaPath := filepath.Join(tempDir, "json-schema.json") + schemaPath := filepath.Join(tempDir, "json-schema-main.json") req.NoError(os.WriteFile(schemaPath, []byte(schemaString), 0644)) // Read references from local reference schema file