mirror of https://github.com/grpc/grpc.git
commit
d6c292f177
24 changed files with 367 additions and 148 deletions
@ -0,0 +1,38 @@ |
||||
# Patches to grpc repo tags for the backwards compatibility interop tests |
||||
|
||||
This directory has patch files that can be applied to different tags |
||||
of the grpc git repo in order to run the interop tests for a specific |
||||
language based on that tag. |
||||
|
||||
For example, because the ruby interop tests do not run on the v1.0.1 tag out |
||||
of the box, but we still want to test compatibility of the 1.0.1 ruby release |
||||
with other versions, we can apply a patch to the v1.0.1 tag from this directory |
||||
that makes the necessary changes that are needed to run the ruby interop tests |
||||
from that tag. We can then use that patch to build the docker image for the |
||||
ruby v1.0.1 interop tests. |
||||
|
||||
## How to add a new patch to this directory |
||||
|
||||
Patch files in this directory are meant to be applied to a git tag |
||||
with a `git apply` command. |
||||
|
||||
1. Under the `patches` directory, create a new subdirectory |
||||
titled `<language>_<git_tag>` for the git tag being modified. |
||||
|
||||
2. `git checkout <git_tag>` |
||||
|
||||
3. Make necessary modifications to the git repo at that tag. |
||||
|
||||
4. |
||||
|
||||
``` |
||||
git diff > ~/git_repo.patch |
||||
git checkout <current working branch> |
||||
cp ~/git_repo.patch tools/interop_matrix/patches/<language>_<git_tag>/ |
||||
``` |
||||
|
||||
5. Edit the `LANGUAGE_RELEASE_MATRIX` in `client_matrix.py` for your language/tag |
||||
and add a `'patch': [<files>,....]` entry to it's `dictionary`. |
||||
|
||||
After doing this, the interop image creation script can apply that patch to the |
||||
tag with `git apply` before uploading to the test image repo. |
@ -0,0 +1,34 @@ |
||||
diff --git a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
|
||||
index 88b5130..7ae9f7d 100644
|
||||
--- a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
|
||||
+++ b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
|
||||
@@ -70,12 +70,12 @@ RUN apt-get update && apt-get install -y time && apt-get clean
|
||||
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
|
||||
RUN \curl -sSL https://get.rvm.io | bash -s stable
|
||||
|
||||
-# Install Ruby 2.1
|
||||
-RUN /bin/bash -l -c "rvm install ruby-2.1"
|
||||
-RUN /bin/bash -l -c "rvm use --default ruby-2.1"
|
||||
+# Install Ruby 2.1.8
|
||||
+RUN /bin/bash -l -c "rvm install ruby-2.1.8"
|
||||
+RUN /bin/bash -l -c "rvm use --default ruby-2.1.8"
|
||||
RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
|
||||
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
|
||||
-RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
|
||||
+RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1.8' >> ~/.bashrc"
|
||||
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
|
||||
|
||||
# Prepare ccache
|
||||
diff --git a/tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh
|
||||
index 97b3860..cec046d 100755
|
||||
--- a/tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh
|
||||
+++ b/tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh
|
||||
@@ -38,7 +38,7 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
|
||||
cp -r /var/local/jenkins/service_account $HOME || true
|
||||
|
||||
cd /var/local/git/grpc
|
||||
-rvm --default use ruby-2.1
|
||||
+rvm --default use ruby-2.1.8
|
||||
|
||||
# build Ruby interop client and server
|
||||
(cd src/ruby && gem update bundler && bundle && rake compile)
|
@ -0,0 +1,20 @@ |
||||
#!/bin/bash |
||||
echo "Testing ${docker_image:=grpc_interop_ruby:6bd1f0eb-51a4-4ad8-861c-1cbd7a929f33}" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response" |
||||
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server" |
Loading…
Reference in new issue