common/kafka: use enumer for SASLMechanism

This commit is contained in:
Vincent Bernat
2024-11-23 19:48:04 +01:00
parent 84d51e0ca9
commit 4332750edb
3 changed files with 16 additions and 55 deletions

View File

@@ -47,7 +47,7 @@ func TestKafkaNewConfig(t *testing.T) {
},
SASLUsername: "hello",
SASLPassword: "password",
SASLMechanism: SASLSCRAMSHA256,
SASLMechanism: SASLScramSHA256,
},
},
}, {
@@ -59,7 +59,7 @@ func TestKafkaNewConfig(t *testing.T) {
},
SASLUsername: "hello",
SASLPassword: "password",
SASLMechanism: SASLSCRAMSHA512,
SASLMechanism: SASLScramSHA512,
},
},
},
@@ -130,7 +130,7 @@ func TestTLSConfiguration(t *testing.T) {
},
SASLUsername: "hello",
SASLPassword: "bye",
SASLMechanism: SASLPlainText,
SASLMechanism: SASLPlain,
},
},
}, {
@@ -158,13 +158,9 @@ func TestTLSConfiguration(t *testing.T) {
},
SASLUsername: "hello",
SASLPassword: "bye",
SASLMechanism: SASLSCRAMSHA256,
SASLMechanism: SASLScramSHA256,
},
},
},
})
}
func TestMarshalUnmarshal(t *testing.T) {
saslAlgorithmMap.TestMarshalUnmarshal(t)
}