Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use --remote for acceptance tests run on drone #32299

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Aug 10, 2018

Description

  1. Pass through any input arguments from tests/drone/test-acceptance.sh to the acceptance test run.sh
  2. Add the --remote argument to the place it is missing in .drone.yml

Motivation and Context

tests/drone/test-acceptance.sh is used with arguments in some places, but actually it ignores its arguments. So those places are totally misleading at the moment. It should pass its arguments through to run.sh when it calls it.

The --remote argument is to indicate that the system-under-test is "black-box" or "remote" - i.e. we cannot or should not rely on being able to "manipulate it under the hood" by doing local commands from the test script. At the moment, what that means in practice, is that we assume that the SUT already has the testing app enabled, so we do not need to bother trying to enable it, and can do all our setup using the testing app. We should be consistent and always use --remote when running on drone, because the testing app is indeed pre-enabled and ready.

How Has This Been Tested?

CI will show.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@phil-davis
Copy link
Contributor Author

Some log output from an API acceptance test suite:

+ touch /drone/saved-settings.sh
+ . /drone/saved-settings.sh
+ ./tests/drone/test-acceptance.sh --remote
++ pwd
+++ dirname ./tests/drone/test-acceptance.sh
++ cd ./tests/drone
++ pwd -P
+ [[ /drone/src == \/\d\r\o\n\e\/\s\r\c\/\t\e\s\t\s\/\d\r\o\n\e ]]
+ declare -x OC_TEST_ALT_HOME
+ [[ -z '' ]]
+ OC_TEST_ALT_HOME=1
+ pushd tests/acceptance
+ su-exec www-data ./run.sh --remote

The --remote argument is getting passed through.

@phil-davis
Copy link
Contributor Author

Backport stable10 #32301

@codecov
Copy link

codecov bot commented Aug 10, 2018

Codecov Report

Merging #32299 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #32299   +/-   ##
=========================================
  Coverage     64.01%   64.01%           
  Complexity    18559    18559           
=========================================
  Files          1171     1171           
  Lines         69834    69834           
  Branches       1267     1267           
=========================================
  Hits          44706    44706           
  Misses        24758    24758           
  Partials        370      370
Flag Coverage Δ Complexity Δ
#javascript 52.84% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.29% <ø> (ø) 18559 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f1d372...e8e72dc. Read the comment docs.

@phil-davis phil-davis merged commit 09ece7d into master Aug 10, 2018
@phil-davis phil-davis deleted the using-remote-param-for-run-sh branch August 10, 2018 13:41
@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants