Repository navigation
BUILD: Give the browser contract suite its _51DEGREES_ names - #225
Merged
Merged
Conversation
The selenium-api-tests suite now reads only the _51DEGREES_ names. The browser contract run still set EXAMPLE_URL and EXAMPLE_LANG, so the suite saw no running example, tried to launch a .NET example of its own, and failed every Contract test asking for _51DEGREES_RESOURCE_KEY_BESPOKE. Set _51DEGREES_EXAMPLE_URL and _51DEGREES_EXAMPLE_LANG instead. An example that is already running needs no key from the suite. CLOUD_ROOT_URL and PAID_RESOURCE_KEY are no longer set, because the suite no longer reads them.
The Selenium contract ran only when _51DEGREES_RESOURCE_KEY was set. CI has no secret or variable of that name, and common-ci exports each _51DEGREES_ name as it is, so the contract was skipped in CI. The run now asks for _51DEGREES_RESOURCE_KEY_BESPOKE, the key that carries every property, and gives it to the cloud example under the name it reads, _51DEGREES_RESOURCE_KEY, for that run only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The selenium-api-tests suite's
main(eafc1ce5, "Release Candidate (#45)", 01:11 UTC on 23 November) reads only the_51DEGREES_names, inTestsCommon/TestConfig.csandExamples/ExampleApps.cs. The browser contract run here still setEXAMPLE_URL,EXAMPLE_LANG,CLOUD_ROOT_URLandPAID_RESOURCE_KEY. With no_51DEGREES_EXAMPLE_URLthe suite treats the example as not running, picks its defaultdotnetdescriptor and tries to launch that example itself, which needs_51DEGREES_RESOURCE_KEY_BESPOKE. Every Contract test then fails inClassInitorInitwith "Required environment variable '_51DEGREES_RESOURCE_KEY_BESPOKE' is not set". The same fault, with the same message, failed all 9 Contract tests of the Rust repository's browser contract job (51degrees-rust run 45094371870).A second fault kept the contract from running in CI at all. The Selenium contract ran only when
_51DEGREES_RESOURCE_KEYwas set. No organization secret, organization variable, repository secret or repository variable has that name, and the shared export step in common-ci exports each_51DEGREES_name as it is, without renaming. So in CI the contract was skipped with "_51DEGREES_RESOURCE_KEY is not set, so the Selenium contract tests were not run against the web examples."Change
ci/run-integration-tests.ps1sets_51DEGREES_EXAMPLE_URLand_51DEGREES_EXAMPLE_LANG=javafor the running example, clears both afterwards, and no longer setsCLOUD_ROOT_URLandPAID_RESOURCE_KEY, which the suite no longer reads.The contract now asks for
_51DEGREES_RESOURCE_KEY_BESPOKE, the key that carries every property, and gives it to the cloud example as_51DEGREES_RESOURCE_KEYfor that run only, which is how the .NET, Python and PHP repositories give their cloud examples the key (second commit, 4d29621).No key is passed to the suite. Its README says a Contract run against an example that is already running needs no cloud address and no key, and
ExampleApps.BuildOptionsreads the key only as optional in that case.Verification
This repository's suite run happens in the Pull Requests workflow, which builds the pull requests that are ready, so it does not build this draft.
ci/check-environment-variable-names.ps1passes on this branch, locally and in its workflow.ci/run-integration-tests.ps1(first commit) was run on its own on Windows against the cloud web example built from the published packages, with the suite cloned at itsmain(eafc1ce5). The suite tested the running example under the new names, and no test asked for a key ("The 'java' example's client-side callback did not complete and render into '#apple-detection' within 60s."). The example's web application did not start in that local build, so all 9 tests failed on the page and this is not a pass. The CI build uses the-Pdevprofile instead.main. In the Rust repository (51degrees-rust#512) it took both browser contract jobs from 0 of 9 to 9 of 9 (run 45097629163). The contract sections of the .NET (51degrees-dotnet#311) and Node (51degrees-node#230) repositories, run on their own against their cloud web examples, went from 0 of 9 on rc to 9 of 9 with the change, the Node one with only_51DEGREES_RESOURCE_KEY_BESPOKEset.A Pull Requests run once this draft is ready is still needed to show the contract passing here.