Fix api/ and sdk/ package tests (#25067)

* fix

* left in incorrectly

* don't print generate commands

* handle line breaks

* remove -e
This commit is contained in:
miagilepner
2024-01-25 14:45:44 +01:00
committed by GitHub
parent 0e227bf0d7
commit 49a59bda5e
11 changed files with 178 additions and 118 deletions

View File

@@ -86,7 +86,7 @@ func TestClientDefaultHttpClient_unixSocket(t *testing.T) {
if client.addr.Scheme != "http" {
t.Fatalf("bad: %s", client.addr.Scheme)
}
if client.addr.Host != "/var/run/vault.sock" {
if client.addr.Host != "localhost" {
t.Fatalf("bad: %s", client.addr.Host)
}
}
@@ -111,8 +111,8 @@ func TestClientSetAddress(t *testing.T) {
if client.addr.Scheme != "http" {
t.Fatalf("bad: expected: 'http' actual: %q", client.addr.Scheme)
}
if client.addr.Host != "/var/run/vault.sock" {
t.Fatalf("bad: expected: '/var/run/vault.sock' actual: %q", client.addr.Host)
if client.addr.Host != "localhost" {
t.Fatalf("bad: expected: 'localhost' actual: %q", client.addr.Host)
}
if client.addr.Path != "" {
t.Fatalf("bad: expected '' actual: %q", client.addr.Path)
@@ -1521,7 +1521,7 @@ func TestParseAddressWithUnixSocket(t *testing.T) {
if u.Scheme != "http" {
t.Fatal("Scheme not changed to http")
}
if u.Host != "/var/run/vault.sock" {
if u.Host != "localhost" {
t.Fatal("Host not changed to socket name")
}
if u.Path != "" {