Skip to content

Commit

Permalink
rpk: Add start tests for NamedAuthNSocketAddress
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Pope <ben@redpanda.com>
  • Loading branch information
BenPope committed Jul 19, 2022
1 parent 6d24c64 commit 49eaed9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/go/rpk/pkg/cli/cmd/redpanda/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ func TestParseSeeds(t *testing.T) {
}

func TestStartCommand(t *testing.T) {
authNSasl := "sasl"
tests := []struct {
name string
launcher redpanda.Launcher
Expand Down Expand Up @@ -929,7 +930,7 @@ func TestStartCommand(t *testing.T) {
name: "it should parse the --kafka-addr and persist it (list)",
args: []string{
"--install-dir", "/var/lib/redpanda",
"--kafka-addr", "nondefaultname://192.168.34.32,host:9092",
"--kafka-addr", "nondefaultname://192.168.34.32,host:9092,authn://host:9093|sasl",
},
postCheck: func(fs afero.Fs, _ *redpanda.RedpandaArgs, st *testing.T) {
conf, err := new(config.Params).Load(fs)
Expand All @@ -941,6 +942,11 @@ func TestStartCommand(t *testing.T) {
}, {
Address: "host",
Port: 9092,
}, {
Name: "authn",
Address: "host",
Port: 9093,
AuthN: &authNSasl,
}}
// Check that the generated config is as expected.
require.Exactly(
Expand Down

0 comments on commit 49eaed9

Please sign in to comment.