Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@gitlab.com>2019-02-11 23:04:57 +0300
committerAndrew Newdigate <andrew@gitlab.com>2019-02-11 23:05:28 +0300
commit560044329b21ced5def4ac6c12edae73ce79481c (patch)
tree6580c984d7832d1f14cf4a3882f885eff0f8ec32
parent23f32e3ac37a6834debaa1bb9d12ce6e772e44aa (diff)
Add test to ensure ruby functionality w/ proxy
GRPC does not officially support unix sockets, although recent versions do superficially support it through the `unix:` prefix. Unfortunately this support fails when http proxy configurations are used. This change adds tests to test this situation
-rw-r--r--.gitlab-ci.yml6
-rw-r--r--Makefile4
-rw-r--r--_support/makegen.go4
3 files changed, 14 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0a6cfdc08..b94084965 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -105,6 +105,12 @@ test:go1.10-git2.18-ruby-2.4:
<<: *test_definition
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.4-golang-1.10-git-2.18
+test:proxy:
+ <<: *test_definition
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.5-golang-1.10-git-2.18
+ script:
+ - make test-with-proxies
+
race:
<<: *go_test_definition
script:
diff --git a/Makefile b/Makefile
index 5e79ab055..3772a585b 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,10 @@ prepare-tests: prepare-build
test: prepare-build
cd $(BUILD_DIR) && $(MAKE) $@
+.PHONY: test-with-proxies
+test-with-proxies: prepare-build
+ cd $(BUILD_DIR) && $(MAKE) $@
+
.PHONY: rspec
rspec: prepare-build
cd $(BUILD_DIR) && $(MAKE) $@
diff --git a/_support/makegen.go b/_support/makegen.go
index c381b149b..d5555acdd 100644
--- a/_support/makegen.go
+++ b/_support/makegen.go
@@ -317,6 +317,10 @@ test: test-go rspec rspec-gitlab-shell
test-go: prepare-tests
@go test -tags "$(BUILD_TAGS)" -count=1 {{ join .AllPackages " " }} # count=1 bypasses go 1.10 test caching
+.PHONY: test-with-proxies
+test-with-proxies: prepare-tests
+ @http_proxy=http://invalid https_proxy=https://invalid go test -tags "$(BUILD_TAGS)" -count=1 {{ .Pkg }}/internal/rubyserver/
+
.PHONY: race-go
race-go: prepare-tests
@go test -tags "$(BUILD_TAGS)" -race {{ join .AllPackages " " }}