From a5ac7e7a0c9aa5e6c9a429444d1ae2a90718eb94 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Sat, 2 Mar 2019 19:21:19 +0100 Subject: [PATCH] Fix CI/CD bridge variables unit test --- spec/models/ci/bridge_spec.rb | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/spec/models/ci/bridge_spec.rb b/spec/models/ci/bridge_spec.rb index c5908eed00a..b5ec8991720 100644 --- a/spec/models/ci/bridge_spec.rb +++ b/spec/models/ci/bridge_spec.rb @@ -25,22 +25,16 @@ describe Ci::Bridge do describe '#scoped_variables_hash' do it 'returns a hash representing variables' do - expect(bridge.scoped_variables_hash.keys).to eq %w[ - CI GITLAB_CI GITLAB_FEATURES CI_SERVER_NAME - CI_SERVER_VERSION CI_SERVER_VERSION_MAJOR - CI_SERVER_VERSION_MINOR CI_SERVER_VERSION_PATCH - CI_SERVER_REVISION CI_JOB_NAME CI_JOB_STAGE - CI_COMMIT_SHA CI_COMMIT_SHORT_SHA CI_COMMIT_BEFORE_SHA - CI_COMMIT_REF_NAME CI_COMMIT_REF_SLUG CI_NODE_TOTAL - CI_BUILD_REF CI_BUILD_BEFORE_SHA CI_BUILD_REF_NAME - CI_BUILD_REF_SLUG CI_BUILD_NAME CI_BUILD_STAGE + variables = %w[ + CI_JOB_NAME CI_JOB_STAGE CI_COMMIT_SHA CI_COMMIT_SHORT_SHA + CI_COMMIT_BEFORE_SHA CI_COMMIT_REF_NAME CI_COMMIT_REF_SLUG CI_PROJECT_ID CI_PROJECT_NAME CI_PROJECT_PATH - CI_PROJECT_PATH_SLUG CI_PROJECT_NAMESPACE CI_PROJECT_URL - CI_PROJECT_VISIBILITY CI_PAGES_DOMAIN CI_PAGES_URL - CI_REGISTRY CI_REGISTRY_IMAGE CI_API_V4_URL - CI_PIPELINE_IID CI_CONFIG_PATH CI_PIPELINE_SOURCE - CI_COMMIT_MESSAGE CI_COMMIT_TITLE CI_COMMIT_DESCRIPTION + CI_PROJECT_PATH_SLUG CI_PROJECT_NAMESPACE CI_PIPELINE_IID + CI_CONFIG_PATH CI_PIPELINE_SOURCE CI_COMMIT_MESSAGE + CI_COMMIT_TITLE CI_COMMIT_DESCRIPTION ] + + expect(bridge.scoped_variables_hash.keys).to include(*variables) end end end