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

Improve testing experience #161

Merged
merged 4 commits into from
May 6, 2020
Merged

Conversation

ezkl
Copy link
Contributor

@ezkl ezkl commented Apr 30, 2020

Adds four new environment variables:

  • VCR_DISABLE: If set, tests are run with VCR disabled
  • FASTLY_TEST_SERVICE_ID: Set a different test service ID
  • FASTLY_API_URL: Set a different URL for Fastly API requests
  • FASTLY_RTS_URL: Set a different URL for real-time stats requests

Adds two new make targets:

  • test-full: run tests w/ VCR disabled
  • fix-fixtures: runs a scripts/fixFixtures.sh script, which replaces FASTLY_TEST_SERVICE_ID with the default test service ID in the fixtures

Adds "Testing" section to README

ezkl added 3 commits April 30, 2020 14:09
Adds three new environment variables:
* VCR_DISABLE: If set, tests are run with VCR disabled
* FASTLY_TEST_SERVICE_ID: Value will be used as the default test service
* FASTLY_API_URL: Use different URL for Fastly API

Also, adds `test-full` make target
@ezkl ezkl changed the title [WIP] Improve testing experience Improve testing experience May 4, 2020
@ezkl ezkl requested review from phamann and philippschulte May 4, 2020 18:09
Copy link
Member

@phamann phamann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 A couple of minor, non-blocking comments.

My biggest thought is we should add some small documentation to the README.md which details how to run tests with/without these helpers to make it easier for external contributors.

fastly/fastly_test.go Outdated Show resolved Hide resolved
scripts/fixFixtures.sh Show resolved Hide resolved
@phamann phamann self-requested a review May 6, 2020 20:52
Copy link
Member

@phamann phamann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readme updates look great 👍

@ezkl ezkl merged commit d5b4788 into fastly:master May 6, 2020
@ezkl ezkl deleted the ezkl/improve-test-experience branch May 6, 2020 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants