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

WIP: Create contract tests for interaction with Auth service. #659

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pmacik
Copy link
Contributor

@pmacik pmacik commented Oct 12, 2018

No description provided.

@centos-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@pmacik pmacik force-pushed the contract-tests-auth-poc branch 2 times, most recently from 0ce4f49 to 6d5fcbc Compare October 12, 2018 14:28

# Configuration of contract tests
PACT_VERSION ?= 1.0.0
PACT_BROKER_URL ?= http://pact-broker-pact-broker.193b.starter-ca-central-1.openshiftapps.com
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't relay on OSO-starter to run the broker. Need a better place for that.

Choose a reason for hiding this comment

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

Maybe the same home as sentry and ike bots? /cc @kbsingh

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah.. it should be preview or prod cluster. @pmacik talk to the SD team.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexeykazakov @bartoszmajsak Thanks for the suggestion, created appropriate SD ticket for that (https://gitlab.cee.redhat.com/dtsd/housekeeping/issues/2383)

@bartoszmajsak
Copy link

bartoszmajsak commented Oct 12, 2018

Who is a provider and who is a consumer here? Or in other words - where can I see auth tests?

@bartoszmajsak
Copy link

Few other points

  • publishing part ideally should be part of the test code - so we can nicely wrap it as part of test execution rather than a shell script run afterwards
  • I would think of contract tests actually touching some real component talking with the underlying service - thinking about it as a "shareable mock" - you mock auth service but excercise some actual logic in the component which communicates with it

@pmacik
Copy link
Contributor Author

pmacik commented Oct 15, 2018

Who is a provider and who is a consumer here? Or in other words - where can I see auth tests?

@bartoszmajsak The provider is the Auth service (PACT_PROVIDER_BASE_URL) while the consumer is the tenant service itself.

It's still a WIP so both contract sides are in the same place, but the auth tests (the provider tests) are the part verifying the pact file taken from broker against a living auth service instance (=test-contract-auth-verify-broker, I plan to move that to the auth service repo and include it in their tests).

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.

4 participants