diff --git a/spec/fixtures/approvals/matrix_integration_environment_spec.approved.json b/spec/fixtures/approvals/matrix_integration_environment_spec.approved.json new file mode 100644 index 000000000..91a6dc0c0 --- /dev/null +++ b/spec/fixtures/approvals/matrix_integration_environment_spec.approved.json @@ -0,0 +1,62 @@ +{ + "PactBroker::Matrix::Service find with environments when there is a successful verification between the provider in test environment and the consumer to be deployed allows the consumer to be deployed": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::Successful" + ] + }, + "PactBroker::Matrix::Service find with environments when there is an unsuccessful verification between the provider in test environment and the consumer to be deployed does not allow the consumer to be deployed": { + "deployable": false, + "reasons": [ + "PactBroker::Matrix::VerificationFailed" + ] + }, + "PactBroker::Matrix::Service find with environments when the provider has not been deployed to the given environment does not allow the consumer to be deployed": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find with environments when the consumer has not been deployed to the given environment allows the provider to be deployed": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing" + ] + }, + "PactBroker::Matrix::Service find with environments when deploying a version of a provider with multiple versions of a consumer in production knows that there are multiple versions of the consumer in production": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find with environments when deploying a version of a provider with multiple versions of a consumer in production when a verification for the latest prod version is missing does not allow the provider to be deployed": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find with environments when deploying a version of a provider with multiple versions of a consumer in production when there is a successful verification for every prod version of the consumer does allow the provider to be deployed": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::Successful" + ] + }, + "PactBroker::Matrix::Service find with environments when deploying a version of a consumer with multiple versions of a provider in production knows that there are multiple versions of the provider in production": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find with environments when deploying a version of a consumer with multiple versions of a provider in production when a verification for the latest prod version is missing does not allow the consumer to be deployed": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find with environments when deploying a version of a consumer with multiple versions of a provider in production when there is a successful verification for every prod version of the consumer does allow the consumer to be deployed": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::Successful" + ] + } +} diff --git a/spec/fixtures/approvals/matrix_integration_environment_spec.approved.txt b/spec/fixtures/approvals/matrix_integration_environment_spec.approved.txt deleted file mode 100644 index 6c61099a8..000000000 --- a/spec/fixtures/approvals/matrix_integration_environment_spec.approved.txt +++ /dev/null @@ -1,61 +0,0 @@ ---- -? PactBroker::Matrix::Service find with environments when there is a successful verification - between the provider in test environment and the consumer to be deployed allows - the consumer to be deployed -: deployable: true - reasons: - - PactBroker::Matrix::Successful -? PactBroker::Matrix::Service find with environments when there is an unsuccessful - verification between the provider in test environment and the consumer to be deployed - does not allow the consumer to be deployed -: deployable: false - reasons: - - PactBroker::Matrix::VerificationFailed -? PactBroker::Matrix::Service find with environments when the provider has not been - deployed to the given environment does not allow the consumer to be deployed -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find with environments when the consumer has not been - deployed to the given environment allows the provider to be deployed -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing -? PactBroker::Matrix::Service find with environments when deploying a version of a - provider with multiple versions of a consumer in production knows that there are - multiple versions of the consumer in production -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find with environments when deploying a version of a - provider with multiple versions of a consumer in production when a verification - for the latest prod version is missing does not allow the provider to be deployed -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find with environments when deploying a version of a - provider with multiple versions of a consumer in production when there is a successful - verification for every prod version of the consumer does allow the provider to be - deployed -: deployable: true - reasons: - - PactBroker::Matrix::Successful -? PactBroker::Matrix::Service find with environments when deploying a version of a - consumer with multiple versions of a provider in production knows that there are - multiple versions of the provider in production -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find with environments when deploying a version of a - consumer with multiple versions of a provider in production when a verification - for the latest prod version is missing does not allow the consumer to be deployed -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find with environments when deploying a version of a - consumer with multiple versions of a provider in production when there is a successful - verification for every prod version of the consumer does allow the consumer to be - deployed -: deployable: true - reasons: - - PactBroker::Matrix::Successful diff --git a/spec/fixtures/approvals/matrix_integration_ignore_spec.approved.json b/spec/fixtures/approvals/matrix_integration_ignore_spec.approved.json new file mode 100644 index 000000000..0d8bf76ba --- /dev/null +++ b/spec/fixtures/approvals/matrix_integration_ignore_spec.approved.json @@ -0,0 +1,124 @@ +{ + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider with a missing verification from a provider deployment_status_summary is expected to be deployable": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider with a missing verification from a provider without any ignore selectors deployment_status_summary is expected not to be deployable": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider with a failed verification from a provider deployment_status_summary is expected to be deployable": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider with a failed verification from a provider without any ignore selectors deployment_status_summary is expected not to be deployable": { + "deployable": false, + "reasons": [ + "PactBroker::Matrix::VerificationFailed" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider with a failed verification from a provider when ignoring the specific provider version deployment_status_summary is expected to be deployable": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider with a failed verification from a provider when ignoring a different specific provider version deployment_status_summary is expected not to be deployable": { + "deployable": false, + "reasons": [ + "PactBroker::Matrix::IgnoreSelectorDoesNotExist", + "PactBroker::Matrix::VerificationFailed" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider when the provider has not been deployed deployment_status_summary is expected to be deployable": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider when the provider has not been deployed without any ignore selectors deployment_status_summary is expected not to be deployable": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider when the consumer and provider have been specified deployment_status_summary is expected to be deployable": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing", + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider when the consumer and provider have been specified without any ignore selectors deployment_status_summary is expected not to be deployable": { + "deployable": false, + "reasons": [ + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified", + "PactBroker::Matrix::VerificationFailed" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider when the consumer and provider have been specified and the provider version specified does not exist deployment_status_summary is expected to be deployable": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing", + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider when the consumer and provider have been specified and the provider version specified does not exist without any ignore selectors deployment_status_summary is expected not to be deployable": { + "deployable": false, + "reasons": [ + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified", + "PactBroker::Matrix::SpecifiedVersionDoesNotExist" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider when the provider to ignore does not exist includes a warning about the incorrect ignore selector": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::IgnoreSelectorDoesNotExist", + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider when the provider version to ignore does not exist includes a warning about the incorrect ignore selector": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::IgnoreSelectorDoesNotExist", + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying a provider and ignoring a consumer with a missing verification from a provider does allows the provider to be deployed even without ignoring anything because there is no connection between that version of the provider and the consumer": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing" + ] + }, + "PactBroker::Matrix::Service find when deploying a provider and ignoring a consumer with a failed verification from a provider deployment_status_summary is expected to be deployable": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing" + ] + }, + "PactBroker::Matrix::Service find when deploying a provider and ignoring a consumer with a failed verification from a provider without any ignore selectors deployment_status_summary is expected not to be deployable": { + "deployable": false, + "reasons": [ + "PactBroker::Matrix::VerificationFailed" + ] + }, + "PactBroker::Matrix::Service find when deploying a provider and ignoring a consumer with a failed verification from a provider when ignoring the specific consumer version deployment_status_summary is expected to be deployable": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing" + ] + }, + "PactBroker::Matrix::Service find when deploying a provider and ignoring a consumer with a failed verification from a provider when ignoring the wrong specific consumer version deployment_status_summary is expected not to be deployable": { + "deployable": false, + "reasons": [ + "PactBroker::Matrix::IgnoreSelectorDoesNotExist", + "PactBroker::Matrix::VerificationFailed" + ] + } +} diff --git a/spec/fixtures/approvals/matrix_integration_ignore_spec.approved.txt b/spec/fixtures/approvals/matrix_integration_ignore_spec.approved.txt deleted file mode 100644 index e7eb846e6..000000000 --- a/spec/fixtures/approvals/matrix_integration_ignore_spec.approved.txt +++ /dev/null @@ -1,125 +0,0 @@ ---- -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - with a missing verification from a provider deployment_status_summary is expected - to be deployable -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - with a missing verification from a provider without any ignore selectors deployment_status_summary - is expected not to be deployable -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - with a failed verification from a provider deployment_status_summary is expected - to be deployable -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - with a failed verification from a provider without any ignore selectors deployment_status_summary - is expected not to be deployable -: deployable: false - reasons: - - PactBroker::Matrix::VerificationFailed -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - with a failed verification from a provider when ignoring the specific provider version - deployment_status_summary is expected to be deployable -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - with a failed verification from a provider when ignoring a different specific provider - version deployment_status_summary is expected not to be deployable -: deployable: false - reasons: - - PactBroker::Matrix::IgnoreSelectorDoesNotExist - - PactBroker::Matrix::VerificationFailed -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - when the provider has not been deployed deployment_status_summary is expected to - be deployable -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - when the provider has not been deployed without any ignore selectors deployment_status_summary - is expected not to be deployable -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - when the consumer and provider have been specified deployment_status_summary is - expected to be deployable -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - when the consumer and provider have been specified without any ignore selectors - deployment_status_summary is expected not to be deployable -: deployable: false - reasons: - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified - - PactBroker::Matrix::VerificationFailed -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - when the consumer and provider have been specified and the provider version specified - does not exist deployment_status_summary is expected to be deployable -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - when the consumer and provider have been specified and the provider version specified - does not exist without any ignore selectors deployment_status_summary is expected - not to be deployable -: deployable: false - reasons: - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified - - PactBroker::Matrix::SpecifiedVersionDoesNotExist -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - when the provider to ignore does not exist includes a warning about the incorrect - ignore selector -: deployable: - reasons: - - PactBroker::Matrix::IgnoreSelectorDoesNotExist - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when deploying a consumer and ignoring a provider - when the provider version to ignore does not exist includes a warning about the - incorrect ignore selector -: deployable: - reasons: - - PactBroker::Matrix::IgnoreSelectorDoesNotExist - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when deploying a provider and ignoring a consumer - with a missing verification from a provider does allows the provider to be deployed - even without ignoring anything because there is no connection between that version - of the provider and the consumer -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing -? PactBroker::Matrix::Service find when deploying a provider and ignoring a consumer - with a failed verification from a provider deployment_status_summary is expected - to be deployable -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing -? PactBroker::Matrix::Service find when deploying a provider and ignoring a consumer - with a failed verification from a provider without any ignore selectors deployment_status_summary - is expected not to be deployable -: deployable: false - reasons: - - PactBroker::Matrix::VerificationFailed -? PactBroker::Matrix::Service find when deploying a provider and ignoring a consumer - with a failed verification from a provider when ignoring the specific consumer version - deployment_status_summary is expected to be deployable -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing -? PactBroker::Matrix::Service find when deploying a provider and ignoring a consumer - with a failed verification from a provider when ignoring the wrong specific consumer - version deployment_status_summary is expected not to be deployable -: deployable: false - reasons: - - PactBroker::Matrix::IgnoreSelectorDoesNotExist - - PactBroker::Matrix::VerificationFailed diff --git a/spec/fixtures/approvals/matrix_integration_spec.approved.json b/spec/fixtures/approvals/matrix_integration_spec.approved.json new file mode 100644 index 000000000..906ce32dd --- /dev/null +++ b/spec/fixtures/approvals/matrix_integration_spec.approved.json @@ -0,0 +1,167 @@ +{ + "PactBroker::Matrix::Service find find returns a QueryResultsWithDeploymentStatusSummary": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::Successful" + ] + }, + "PactBroker::Matrix::Service find when deploying a version of a provider with multiple versions of a consumer in production that is missing a verification for the latest prod version does not allow the provider to be deployed": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider", + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer that has not been verified by any providers returns 2 integrations": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider", + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer that has not been verified by any providers it creates selectors for the providers": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider", + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer that has not been verified by any providers does not allow the consumer to be deployed": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider", + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer that has two providers in prod, but it is not verified by one of the prod provider versions, pact_broker-client issue #33 returns 2 integrations": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer that has two providers in prod, but it is not verified by one of the prod provider versions, pact_broker-client issue #33 returns 1 row with a verification": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer that has two providers in prod, but it is not verified by one of the prod provider versions, pact_broker-client issue #33 returns 1 row without a verification": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer that has two providers in prod, but it is not verified by one of the prod provider versions, pact_broker-client issue #33 does not allow the consumer to be deployed": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying an old version of a consumer that has added a new provider since that version allows the old version of the consumer to be deployed": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::Successful" + ] + }, + "PactBroker::Matrix::Service find when the specified version does not exist does not allow the app to be deployed": { + "deployable": false, + "reasons": [ + "PactBroker::Matrix::NoEnvironmentSpecified", + "PactBroker::Matrix::SpecifiedVersionDoesNotExist" + ] + }, + "PactBroker::Matrix::Service find when deploying a provider to prod for the first time and the consumer is not yet deployed allows the app to be deployed": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer to prod for the first time and the provider is not yet deployed does not allow the app to be deployed": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying an app that is both a consumer and a provider to prod for the first time and the downstream provider is not yet deployed does not allow the app to be deployed": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when deploying an app that is both a consumer and a provider to prod for the first time and the downstream provider has been deployed allows the app to be deployed": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::Successful" + ] + }, + "PactBroker::Matrix::Service find when deploying a provider where the pact has not been verified allows the app to be deployed": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoDependenciesMissing" + ] + }, + "PactBroker::Matrix::Service find when deploying a consumer where the pact has been verified, but not by the required provider version returns a reason indicating that the pact has not been verified by the required provider version": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when two applications have pacts with each other (nureva use case) when both application versions are specified explictly does not allow the two apps to be deployed together": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::NoEnvironmentSpecified", + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find when two applications have pacts with each other (nureva use case) when only one application is specified does not allow the two apps to be deployed together": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::NoEnvironmentSpecified", + "PactBroker::Matrix::PactNotEverVerifiedByProvider" + ] + }, + "PactBroker::Matrix::Service find specifying a provider which has multiple prod versions of one consumer (explicit) and a single version of another (inferred) with inferred selectors determines the number of integrations": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider", + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified" + ] + }, + "PactBroker::Matrix::Service find specifying a provider which has multiple prod versions of one consumer (explicit) and a single version of another (inferred) with inferred selectors finds all prod versions of Foo": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider", + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified" + ] + }, + "PactBroker::Matrix::Service find specifying a provider which has multiple prod versions of one consumer (explicit) and a single version of another (inferred) with inferred selectors finds the single prod version of Cat": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider", + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified" + ] + }, + "PactBroker::Matrix::Service find specifying a provider which has multiple prod versions of one consumer (explicit) and a single version of another (inferred) with inferred selectors is not deployable because of the missing verification for Cat v20": { + "deployable": null, + "reasons": [ + "PactBroker::Matrix::PactNotEverVerifiedByProvider", + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified" + ] + }, + "PactBroker::Matrix::Service find specifying a provider which has multiple prod versions of one consumer (explicit) and a single version of another (inferred) without inferred selectors is deployable": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoEnvironmentSpecified", + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified", + "PactBroker::Matrix::Successful" + ] + }, + "PactBroker::Matrix::Service find when there is a consumer with two providers, and only one of them has a verification, and the consumer and the verified provider are explicitly specified should allow the consumer to be deployed": { + "deployable": true, + "reasons": [ + "PactBroker::Matrix::NoEnvironmentSpecified", + "PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified", + "PactBroker::Matrix::Successful" + ] + } +} diff --git a/spec/fixtures/approvals/matrix_integration_spec.approved.txt b/spec/fixtures/approvals/matrix_integration_spec.approved.txt deleted file mode 100644 index 364f079f5..000000000 --- a/spec/fixtures/approvals/matrix_integration_spec.approved.txt +++ /dev/null @@ -1,154 +0,0 @@ ---- -PactBroker::Matrix::Service find find returns a QueryResultsWithDeploymentStatusSummary: - deployable: true - reasons: - - PactBroker::Matrix::Successful -? PactBroker::Matrix::Service find when deploying a version of a provider with multiple - versions of a consumer in production that is missing a verification for the latest - prod version does not allow the provider to be deployed -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified -PactBroker::Matrix::Service find when deploying a consumer that has not been verified by any providers returns 2 integrations: - deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when deploying a consumer that has not been verified - by any providers it creates selectors for the providers -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when deploying a consumer that has not been verified - by any providers does not allow the consumer to be deployed -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? 'PactBroker::Matrix::Service find when deploying a consumer that has two providers - in prod, but it is not verified by one of the prod provider versions, pact_broker-client - issue #33 returns 2 integrations' -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? 'PactBroker::Matrix::Service find when deploying a consumer that has two providers - in prod, but it is not verified by one of the prod provider versions, pact_broker-client - issue #33 returns 1 row with a verification' -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? 'PactBroker::Matrix::Service find when deploying a consumer that has two providers - in prod, but it is not verified by one of the prod provider versions, pact_broker-client - issue #33 returns 1 row without a verification' -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? 'PactBroker::Matrix::Service find when deploying a consumer that has two providers - in prod, but it is not verified by one of the prod provider versions, pact_broker-client - issue #33 does not allow the consumer to be deployed' -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when deploying an old version of a consumer that - has added a new provider since that version allows the old version of the consumer - to be deployed -: deployable: true - reasons: - - PactBroker::Matrix::Successful -PactBroker::Matrix::Service find when the specified version does not exist does not allow the app to be deployed: - deployable: false - reasons: - - PactBroker::Matrix::NoEnvironmentSpecified - - PactBroker::Matrix::SpecifiedVersionDoesNotExist -? PactBroker::Matrix::Service find when deploying a provider to prod for the first - time and the consumer is not yet deployed allows the app to be deployed -: deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing -? PactBroker::Matrix::Service find when deploying a consumer to prod for the first - time and the provider is not yet deployed does not allow the app to be deployed -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when deploying an app that is both a consumer and - a provider to prod for the first time and the downstream provider is not yet deployed - does not allow the app to be deployed -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when deploying an app that is both a consumer and - a provider to prod for the first time and the downstream provider has been deployed - allows the app to be deployed -: deployable: true - reasons: - - PactBroker::Matrix::Successful -PactBroker::Matrix::Service find when deploying a provider where the pact has not been verified allows the app to be deployed: - deployable: true - reasons: - - PactBroker::Matrix::NoDependenciesMissing -? PactBroker::Matrix::Service find when deploying a consumer where the pact has been - verified, but not by the required provider version returns a reason indicating that - the pact has not been verified by the required provider version -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when two applications have pacts with each other - (nureva use case) when both application versions are specified explictly does not - allow the two apps to be deployed together -: deployable: - reasons: - - PactBroker::Matrix::NoEnvironmentSpecified - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find when two applications have pacts with each other - (nureva use case) when only one application is specified does not allow the two - apps to be deployed together -: deployable: - reasons: - - PactBroker::Matrix::NoEnvironmentSpecified - - PactBroker::Matrix::PactNotEverVerifiedByProvider -? PactBroker::Matrix::Service find specifying a provider which has multiple prod versions - of one consumer (explicit) and a single version of another (inferred) with inferred - selectors determines the number of integrations -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified -? PactBroker::Matrix::Service find specifying a provider which has multiple prod versions - of one consumer (explicit) and a single version of another (inferred) with inferred - selectors finds all prod versions of Foo -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified -? PactBroker::Matrix::Service find specifying a provider which has multiple prod versions - of one consumer (explicit) and a single version of another (inferred) with inferred - selectors finds the single prod version of Cat -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified -? PactBroker::Matrix::Service find specifying a provider which has multiple prod versions - of one consumer (explicit) and a single version of another (inferred) with inferred - selectors is not deployable because of the missing verification for Cat v20 -: deployable: - reasons: - - PactBroker::Matrix::PactNotEverVerifiedByProvider - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified -? PactBroker::Matrix::Service find specifying a provider which has multiple prod versions - of one consumer (explicit) and a single version of another (inferred) without inferred - selectors is deployable -: deployable: true - reasons: - - PactBroker::Matrix::NoEnvironmentSpecified - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified - - PactBroker::Matrix::Successful -? PactBroker::Matrix::Service find when there is a consumer with two providers, and - only one of them has a verification, and the consumer and the verified provider - are explicitly specified should allow the consumer to be deployed -: deployable: true - reasons: - - PactBroker::Matrix::NoEnvironmentSpecified - - PactBroker::Matrix::SelectorWithoutPacticipantVersionNumberSpecified - - PactBroker::Matrix::Successful diff --git a/spec/lib/pact_broker/matrix/integration_environment_spec.rb b/spec/lib/pact_broker/matrix/integration_environment_spec.rb index a795ddc1b..c7485f6d5 100644 --- a/spec/lib/pact_broker/matrix/integration_environment_spec.rb +++ b/spec/lib/pact_broker/matrix/integration_environment_spec.rb @@ -24,7 +24,7 @@ module Matrix end after(:all) do - Approvals.verify(ENVIRONMENT_APPROVALS, :name => file_name_to_approval_name(__FILE__) , format: "YamlFormat") + Approvals.verify(ENVIRONMENT_APPROVALS, :name => file_name_to_approval_name(__FILE__) , format: :json) end context "when there is a successful verification between the provider in test environment and the consumer to be deployed" do diff --git a/spec/lib/pact_broker/matrix/integration_ignore_spec.rb b/spec/lib/pact_broker/matrix/integration_ignore_spec.rb index a1d59c94b..6d9cc2b76 100644 --- a/spec/lib/pact_broker/matrix/integration_ignore_spec.rb +++ b/spec/lib/pact_broker/matrix/integration_ignore_spec.rb @@ -24,7 +24,7 @@ module Matrix end after(:all) do - Approvals.verify(INTEGRATION_IGNORE_APPROVALS, :name => file_name_to_approval_name(__FILE__) , format: "YamlFormat") + Approvals.verify(INTEGRATION_IGNORE_APPROVALS, :name => file_name_to_approval_name(__FILE__) , format: :json) end let(:options) { {} } diff --git a/spec/lib/pact_broker/matrix/integration_spec.rb b/spec/lib/pact_broker/matrix/integration_spec.rb index 8b1857e9f..a06f800d5 100644 --- a/spec/lib/pact_broker/matrix/integration_spec.rb +++ b/spec/lib/pact_broker/matrix/integration_spec.rb @@ -24,7 +24,7 @@ module Matrix end after(:all) do - Approvals.verify(INTEGRATION_APPROVALS, :name => file_name_to_approval_name(__FILE__) , format: "YamlFormat") + Approvals.verify(INTEGRATION_APPROVALS, :name => file_name_to_approval_name(__FILE__) , format: :json) end let(:options) { {} }