Skip to content

Commit

Permalink
feat(spanner): add leader_options to InstanceConfig and default_leade…
Browse files Browse the repository at this point in the history
…r to Database

PiperOrigin-RevId: 382409094

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Jun 30 16:30:14 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 2c6e4dd22260e34403b468cc6d19aa43a9c684ed
Source-Link: googleapis/googleapis@2c6e4dd
  • Loading branch information
yoshi-automation authored and jskeet committed Jul 1, 2021
1 parent e59ffc5 commit 9dc6f8b
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public void GetInstanceConfigRequestObject()
InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
DisplayName = "display_name137f65c2",
Replicas = { new ReplicaInfo(), },
LeaderOptions =
{
"leader_optionscedbfd6e",
},
};
mockGrpcClient.Setup(x => x.GetInstanceConfig(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
InstanceAdminClient client = new InstanceAdminClientImpl(mockGrpcClient.Object, null);
Expand All @@ -68,6 +72,10 @@ public void GetInstanceConfigRequestObject()
InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
DisplayName = "display_name137f65c2",
Replicas = { new ReplicaInfo(), },
LeaderOptions =
{
"leader_optionscedbfd6e",
},
};
mockGrpcClient.Setup(x => x.GetInstanceConfigAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<InstanceConfig>(stt::Task.FromResult(expectedResponse), null, null, null, null));
InstanceAdminClient client = new InstanceAdminClientImpl(mockGrpcClient.Object, null);
Expand All @@ -92,6 +100,10 @@ public void GetInstanceConfig()
InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
DisplayName = "display_name137f65c2",
Replicas = { new ReplicaInfo(), },
LeaderOptions =
{
"leader_optionscedbfd6e",
},
};
mockGrpcClient.Setup(x => x.GetInstanceConfig(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
InstanceAdminClient client = new InstanceAdminClientImpl(mockGrpcClient.Object, null);
Expand All @@ -114,6 +126,10 @@ public void GetInstanceConfig()
InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
DisplayName = "display_name137f65c2",
Replicas = { new ReplicaInfo(), },
LeaderOptions =
{
"leader_optionscedbfd6e",
},
};
mockGrpcClient.Setup(x => x.GetInstanceConfigAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<InstanceConfig>(stt::Task.FromResult(expectedResponse), null, null, null, null));
InstanceAdminClient client = new InstanceAdminClientImpl(mockGrpcClient.Object, null);
Expand All @@ -138,6 +154,10 @@ public void GetInstanceConfigResourceNames()
InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
DisplayName = "display_name137f65c2",
Replicas = { new ReplicaInfo(), },
LeaderOptions =
{
"leader_optionscedbfd6e",
},
};
mockGrpcClient.Setup(x => x.GetInstanceConfig(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
InstanceAdminClient client = new InstanceAdminClientImpl(mockGrpcClient.Object, null);
Expand All @@ -160,6 +180,10 @@ public void GetInstanceConfigResourceNames()
InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
DisplayName = "display_name137f65c2",
Replicas = { new ReplicaInfo(), },
LeaderOptions =
{
"leader_optionscedbfd6e",
},
};
mockGrpcClient.Setup(x => x.GetInstanceConfigAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<InstanceConfig>(stt::Task.FromResult(expectedResponse), null, null, null, null));
InstanceAdminClient client = new InstanceAdminClientImpl(mockGrpcClient.Object, null);
Expand Down
Loading

0 comments on commit 9dc6f8b

Please sign in to comment.