Skip to content

Commit

Permalink
chore(bigtable): fix conformance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma committed Jul 22, 2024
1 parent 12ef2ad commit 39fdd56
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 23 deletions.
33 changes: 32 additions & 1 deletion google-cloud-bigtable/.toys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

toys_version! ">= 0.15.3"
toys_version! ">= 0.15.6"

if ENV["RUBY_COMMON_TOOLS"]
common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"]
Expand All @@ -24,3 +24,34 @@
path: "toys/gapic",
update: true
end

tool "conformance" do
tool "gen-tests" do
include :exec
include :gems
include :git_cache

def run
setup
generate
end

def generate
proto_files = ["google/cloud/conformance/bigtable/v2/tests.proto"]
googleapis_dir = git_cache.get "https://github.com/googleapis/googleapis.git", update: true
cmd = [
"grpc_tools_ruby_protoc",
"--ruby_out=.",
"-I", ".",
"-I", googleapis_dir,
] + proto_files
exec cmd
end

def setup
gem "grpc-tools", "~> 1.65"
dir = File.expand_path "conformance/v2/proto", context_directory
Dir.chdir dir
end
end
end

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 39fdd56

Please sign in to comment.