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

Pact tests for ship #980

Merged
merged 2 commits into from
Jun 20, 2019
Merged

Pact tests for ship #980

merged 2 commits into from
Jun 20, 2019

Conversation

sgalsaleh
Copy link
Member

@sgalsaleh sgalsaleh commented Jun 19, 2019

What I Did

Created pact tests for the following queries:
1- GetSlugRelease
2- GetLicense

How I Did it

1- created two test files, get_slug_release_test.go and get_license_test.go.
2- created the test
3- ran it
4- verified it

How to verify it

make pacts , and look at the output file in pacts directory.

Description for the Changelog

Added contract tests for GraphQL API Queries

Picture of a Ship (not required but encouraged)

@@ -314,9 +314,9 @@ func (c *GraphQLClient) GetSlugRelease(selector *Selector) (*state.ShipRelease,
return &shipResponse.Data.ShipSlugRelease, nil
}

func (c *GraphQLClient) getLicense(selector *Selector) (*license, error) {
func (c *GraphQLClient) GetLicense(selector *Selector) (*license, error) {
Copy link

Choose a reason for hiding this comment

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

exported method GetLicense returns unexported type *replicatedapp.license, which can be annoying to use

@laverya
Copy link
Member

laverya commented Jun 20, 2019

At some point in the future we should probably add some 'this is expected to fail' tests, but that can wait

@sgalsaleh sgalsaleh merged commit 07ff55b into master Jun 20, 2019
@sgalsaleh sgalsaleh deleted the ship-pact-tests branch June 20, 2019 21:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants