Fix PKI test compilation error (#15300) (#15312)

The test was using invalid Go syntax: new(string("87600h"))
Changed to create a variable and use its address instead.

Error: string("87600h") is not a type

Co-authored-by: hashigator <280075563+hashigator@users.noreply.github.com>
This commit is contained in:
Vault Automation 2026-06-09 09:12:14 -06:00 committed by GitHub
parent acbcf0f4bd
commit f8a52a964a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,8 +16,9 @@ func testPKISecretsCreate(t *testing.T, v *blackbox.Session) {
v.MustEnableSecretsEngine("pki-create", &api.MountInput{Type: "pki"})
// Configure max TTL for the mount
maxLeaseTTL := "87600h"
err := v.Client.Sys().TuneMountAllowNilWithContext(t.Context(), "pki-create", api.TuneMountConfigInput{
MaxLeaseTTL: new(string("87600h")),
MaxLeaseTTL: &maxLeaseTTL,
})
if err != nil {
t.Fatalf("Failed to tune PKI mount: %v: %v", err, v.Client.Address())