mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 10:12:35 +00:00
VAULT-15668: fix windows issues with -dev-tls flag (#20257)
* fix -dev-tls flag on windows * changelog * fix only hcl config * fix import * fmt
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
"github.com/hashicorp/vault/sdk/physical"
|
||||
physInmem "github.com/hashicorp/vault/sdk/physical/inmem"
|
||||
"github.com/mitchellh/cli"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -317,3 +318,13 @@ func TestServer(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// TestServer_DevTLS verifies that a vault server starts up correctly with the -dev-tls flag
|
||||
func TestServer_DevTLS(t *testing.T) {
|
||||
ui, cmd := testServerCommand(t)
|
||||
args := []string{"-dev-tls", "-dev-listen-address=127.0.0.1:0", "-test-server-config"}
|
||||
retCode := cmd.Run(args)
|
||||
output := ui.ErrorWriter.String() + ui.OutputWriter.String()
|
||||
require.Equal(t, 0, retCode, output)
|
||||
require.Contains(t, output, `tls: "enabled"`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user