Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
adding --tags=~@use_splinter_client
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-gravgaard committed Dec 19, 2013
1 parent 74f3e5a commit bca9061
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ install:
- pip install -q -r requirements_for_tests.txt --use-mirrors
# command to run tests
env:
- SKIP_SPLINTER_TESTS=0
- SKIP_SPLINTER_TESTS=1
script:
- ./run_tests.sh
after_script:
Expand Down
4 changes: 1 addition & 3 deletions features/contrib/evl_upload.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
@use_splinter_client
Feature: EVL Upload

# NOTE: this test is WIP because even though it runs fine in our development environments,
# Travis has a problem when running it: 'Assertion Failed: Expected: <71> but: was <0>'
@wip
Scenario: Upload call center volumes
Given a file named "CEG Data.xlsx" with fixture "contrib/CEG Transaction Tracker.xlsx"
and I have a bucket named "evl_ceg_data"
Expand Down Expand Up @@ -106,3 +103,4 @@ Feature: EVL Upload
{"_timestamp": "2012-05-01T00:00:00+00:00", "transaction": "V-V890 SORN Declaration Vehicles Input", "service": "sorn", "volume": 0.0}
{"_timestamp": "2012-06-01T00:00:00+00:00", "transaction": "V-V890 SORN Declaration Vehicles Triage", "service": "sorn", "volume": 0.0}
"""

7 changes: 1 addition & 6 deletions features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import sys
from backdrop.core.log_handler import get_log_file_handler
from features.support.splinter_client import SplinterClient
from features.support.support import BaseClient


sys.path.append(
os.path.join(os.path.dirname(__file__), '..')
Expand Down Expand Up @@ -56,10 +54,7 @@ def create_client(feature):
if 'use_http_client' in feature.tags:
return HTTPTestClient(config.DATABASE_NAME)
if 'use_splinter_client' in feature.tags:
if os.getenv('SKIP_SPLINTER_TESTS'):
return BaseClient()
else:
return SplinterClient(config.DATABASE_NAME)
return SplinterClient(config.DATABASE_NAME)

raise AssertionError(
"Test client not selected! Please annotate the failing feature with "
Expand Down
8 changes: 7 additions & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ display_result $? 1 "Unit tests"
python -m coverage.__main__ xml --include=backdrop*

# run feature tests
behave --stop --tags=~@wip
if [[ -z "$SKIP_SPLINTER_TESTS" ]]; then
echo "Not skipping splinter tests"
behave --stop --tags=~@wip
else
echo "Skipping splinter tests"
behave --stop --tags=~@wip --tags=~@use_splinter_client
fi
display_result $? 2 "Feature tests"

# run style checks
Expand Down

0 comments on commit bca9061

Please sign in to comment.