Skip to content

Commit

Permalink
fix test failures
Browse files Browse the repository at this point in the history
For some reason 1.9 seems to require an explicit Datacenter name making these RPC requests.
In newer versions it works with the empty string.
  • Loading branch information
dnephin committed Jan 12, 2022
1 parent 919a1e9 commit 0af407b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions agent/consul/leader_connect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ func TestCAManager_RenewIntermediate_Secondary(t *testing.T) {

codec := rpcClient(t, s2)
roots := structs.IndexedCARoots{}
err = msgpackrpc.CallWithCodec(codec, "ConnectCA.Roots", &structs.DCSpecificRequest{}, &roots)
err = msgpackrpc.CallWithCodec(codec, "ConnectCA.Roots", &structs.DCSpecificRequest{
Datacenter: "dc2",
}, &roots)
require.NoError(err)
require.Len(roots.Roots, 1)

Expand All @@ -359,7 +361,7 @@ func TestCAManager_RenewIntermediate_Secondary(t *testing.T) {
}
csr, _ := connect.TestCSR(t, spiffeService)

req := structs.CASignRequest{CSR: csr}
req := structs.CASignRequest{CSR: csr, Datacenter: "dc2"}
cert := structs.IssuedCert{}
err = msgpackrpc.CallWithCodec(codec, "ConnectCA.Sign", &req, &cert)
require.NoError(err)
Expand Down

0 comments on commit 0af407b

Please sign in to comment.