Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
huikang committed Jan 10, 2025
1 parent 1ecf6dd commit c9861ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ func TestTLSClusterWithClientAuthentication(t *testing.T) {
func TestHTTPSClientAuth(t *testing.T) {
conf := gubernator.DaemonConfig{
GRPCListenAddress: "127.0.0.1:9695",
AdvertiseAddress: "127.0.0.1:9695",
HTTPListenAddress: "127.0.0.1:9685",
HTTPStatusListenAddress: "127.0.0.1:9686",
TLS: &gubernator.TLSConfig{
Expand Down Expand Up @@ -332,7 +333,7 @@ func TestHTTPSClientAuth(t *testing.T) {
defer resp.Body.Close()
b, err := io.ReadAll(resp.Body)
require.NoError(t, err)
assert.Equal(t, `{"status":"healthy","message":"","peer_count":1}`, strings.ReplaceAll(string(b), " ", ""))
assert.Equal(t, `{"status":"healthy","message":"","peer_count":1,"own_peer":"127.0.0.1:9695"}`, strings.ReplaceAll(string(b), " ", ""))

// Verify we get an error when we try to access existing HTTPListenAddress without cert
//nolint:bodyclose // Expect error, no body to close.
Expand All @@ -345,7 +346,7 @@ func TestHTTPSClientAuth(t *testing.T) {
defer resp2.Body.Close()
b, err = io.ReadAll(resp2.Body)
require.NoError(t, err)
assert.Equal(t, `{"status":"healthy","message":"","peer_count":1}`, strings.ReplaceAll(string(b), " ", ""))
assert.Equal(t, `{"status":"healthy","message":"","peer_count":1,"own_peer":"127.0.0.1:9695"}`, strings.ReplaceAll(string(b), " ", ""))

}

Expand Down

0 comments on commit c9861ff

Please sign in to comment.