diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2018-10-23 14:54:00 -0400 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2018-11-07 12:16:17 -0500 |
commit | 765ca40d65c6644d2158eb04898a0f3d6e316e31 (patch) | |
tree | 171da745cea50c3da1cdcd2f03b5fe58c3d9b1af /qa/qa/runtime | |
parent | 912741cfea06ead8dad95d20f2f0adb955a55732 (diff) | |
download | gitlab-ce-765ca40d65c6644d2158eb04898a0f3d6e316e31.tar.gz |
Add e2e test of push over SSH over Git protocol v2ml-qa-git-protocol-v2-spec
Adds a new end-to-end test to check that Git protocol v2 can be used to
push over SSH.
Includes a change in Git::Repository to use Runtime::Env.debug? to
enable logging instead of .verbose?
Diffstat (limited to 'qa/qa/runtime')
-rw-r--r-- | qa/qa/runtime/env.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb index c7052a9f300..c4500f9be90 100644 --- a/qa/qa/runtime/env.rb +++ b/qa/qa/runtime/env.rb @@ -7,6 +7,16 @@ module QA attr_writer :personal_access_token + # The environment variables used to indicate if the environment under test + # supports the given feature + SUPPORTED_FEATURES = { + git_protocol_v2: 'QA_CAN_TEST_GIT_PROTOCOL_V2' + }.freeze + + def supported_features + SUPPORTED_FEATURES + end + def debug? enabled?(ENV['QA_DEBUG'], default: false) end @@ -104,6 +114,15 @@ module QA raise ArgumentError, "Please provide GITHUB_ACCESS_TOKEN" end + # Returns true if there is an environment variable that indicates that + # the feature is supported in the environment under test. + # All features are supported by default. + def can_test?(feature) + raise ArgumentError, %Q(Unknown feature "#{feature}") unless SUPPORTED_FEATURES.include? feature + + enabled?(ENV[SUPPORTED_FEATURES[feature]], default: true) + end + private def enabled?(value, default: true) |