@@ -139,7 +139,6 @@ function run_all_instance_admin_examples {
139139 # Verify that calling without a command produces the right exit status and
140140 # some kind of Usage message.
141141 run_example_usage ./bigtable_instance_admin_snippets
142- run_example_usage ./bigtable_samples_instance_admin
143142}
144143
145144# Run all the instance admin async examples.
@@ -225,8 +224,6 @@ function run_all_table_admin_examples {
225224 run_example ./bigtable_instance_admin_snippets create-instance \
226225 " ${project_id} " " ${INSTANCE} " " ${zone_id} "
227226
228- run_example ./bigtable_samples run " ${project_id} " " ${INSTANCE} " " ${TABLE} "
229-
230227 run_example ./table_admin_snippets create-table \
231228 " ${project_id} " " ${INSTANCE} " " ${TABLE} "
232229 run_example ./table_admin_snippets list-tables \
@@ -433,12 +430,6 @@ run_all_data_examples() {
433430
434431 run_mutate_examples " ${project_id} " " ${instance_id} "
435432
436- # Use a different table for the full example test, if we use the same table
437- # as the other tests this can fail with timeouts.
438- local -r FULL_TABLE=" data-ex-full-${RANDOM} -${RANDOM} "
439- run_example ./bigtable_samples run-full-example \
440- " ${project_id} " " ${instance_id} " " ${FULL_TABLE} "
441-
442433 # Use the same table in all the tests.
443434 local -r TABLE=" data-ex-tbl-${RANDOM} -${RANDOM} "
444435 local -r PREFIX_1=" root/0/1/"
@@ -695,6 +686,75 @@ run_quickstart_example() {
695686 run_example_usage ./bigtable_quickstart
696687}
697688
689+ # ###############################################
690+ # Run the Bigtable hello world for InstanceAdmin example.
691+ # Globals:
692+ # None
693+ # Arguments:
694+ # project_id: the Google Cloud Platform project used in the test. Can be a
695+ # fake project when testing against the emulator, as the emulator creates
696+ # projects on demand. It must be a valid, existing instance when testing
697+ # against production.
698+ # zone_id: a Google Cloud Platform zone with support for Cloud Bigtable.
699+ # Returns:
700+ # None
701+ # ###############################################
702+ run_hello_instance_admin_example () {
703+ local project_id=$1
704+ local zone_id=$2
705+ shift 2
706+
707+ # Use the same table in all the tests.
708+ local -r RANDOM_INSTANCE_ID=" it-${RANDOM} -${RANDOM} "
709+ local -r RANDOM_CLUSTER_ID=" ${RANDOM_INSTANCE_ID} -c1"
710+
711+ run_example ./bigtable_hello_instance_admin " run" \
712+ " ${project_id} " " ${RANDOM_INSTANCE_ID} " " ${RANDOM_CLUSTER_ID} " \
713+ " ${zone_id} "
714+
715+ # Verify that calling without a command produces the right exit status and
716+ # some kind of Usage message.
717+ run_example_usage ./bigtable_hello_instance_admin
718+ }
719+
720+ # ###############################################
721+ # Run the Bigtable hello world for Table Admin example.
722+ # Globals:
723+ # None
724+ # Arguments:
725+ # project_id: the Google Cloud Platform project used in the test. Can be a
726+ # fake project when testing against the emulator, as the emulator creates
727+ # projects on demand. It must be a valid, existing instance when testing
728+ # against production.
729+ # instance_id: the Google Cloud Bigtable instance used in the test. Can be a
730+ # fake instance when testing against the emulator, as the emulator creates
731+ # instances on demand. It must be a valid, existing instance when testing
732+ # against production.
733+ # Returns:
734+ # None
735+ # ###############################################
736+ run_hello_table_admin_example () {
737+ local project_id=$1
738+ local instance_id=$2
739+ shift 2
740+
741+ # TODO(#2626) - remove "run-full-example" it is just a duplicate of "run".
742+ # Use a different table for the full example test, if we use the same table
743+ # as the other tests this can fail with timeouts.
744+ local -r FULL_TABLE=" data-ex-full-${RANDOM} -${RANDOM} "
745+ run_example ./bigtable_hello_table_admin run-full-example \
746+ " ${project_id} " " ${instance_id} " " ${FULL_TABLE} "
747+
748+ # Use the same table in all the tests.
749+ local -r TABLE=" hello-table-admin-${RANDOM} "
750+ run_example ./bigtable_hello_table_admin run \
751+ " ${project_id} " " ${instance_id} " " ${TABLE} "
752+
753+ # Verify that calling without a command produces the right exit status and
754+ # some kind of Usage message.
755+ run_example_usage ./bigtable_hello_world
756+ }
757+
698758# ###############################################
699759# Run the Bigtable hello world example.
700760# Globals:
0 commit comments