Search in sources :

Example 36 with Instance

use of com.google.cloud.redis.v1beta1.Instance in project java-redis by googleapis.

the class ITSystemTest method testGetInstance.

@Test
public void testGetInstance() {
    Instance response = client.getInstance(INSTANCE_NAME);
    assertEquals(TIER, response.getTier());
    assertEquals(INSTANCE_NAME.toString(), response.getName());
}
Also used : Instance(com.google.cloud.redis.v1beta1.Instance) Test(org.junit.Test)

Example 37 with Instance

use of com.google.cloud.redis.v1beta1.Instance in project java-redis by googleapis.

the class ITSystemTest method testListInstances.

@Test
public void testListInstances() {
    List<Instance> instances = Lists.newArrayList(client.listInstances(PARENT).iterateAll());
    for (Instance instance : instances) {
        if (INSTANCE_NAME.toString().equals(instance.getName())) {
            assertEquals(TIER, instance.getTier());
            assertEquals(INSTANCE_NAME.toString(), instance.getName());
        }
    }
}
Also used : Instance(com.google.cloud.redis.v1beta1.Instance) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)18 Instance (com.google.cloud.compute.v1.Instance)11 InstancesClient (com.google.cloud.compute.v1.InstancesClient)11 Instance (com.google.bigtable.admin.v2.Instance)10 ByteString (com.google.protobuf.ByteString)9 AbstractMessage (com.google.protobuf.AbstractMessage)8 Operation (com.google.cloud.compute.v1.Operation)7 InsertInstanceRequest (com.google.cloud.compute.v1.InsertInstanceRequest)6 AttachedDisk (com.google.cloud.compute.v1.AttachedDisk)5 NetworkInterface (com.google.cloud.compute.v1.NetworkInterface)5 Instance (com.google.cloud.redis.v1.Instance)5 HashMap (java.util.HashMap)5 InvalidArgumentException (com.google.api.gax.rpc.InvalidArgumentException)4 Cluster (com.google.bigtable.admin.v2.Cluster)4 Instance (com.google.cloud.redis.v1beta1.Instance)4 FieldMask (com.google.protobuf.FieldMask)4 Instance (com.scaleset.cfbuilder.ec2.Instance)4 StatusRuntimeException (io.grpc.StatusRuntimeException)4 Operation (com.google.longrunning.Operation)3 CreateInstanceRequest (com.google.bigtable.admin.v2.CreateInstanceRequest)2