-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update hashTests
function to support the migration of test results across test plan versions using the v2 test format
#880
Conversation
hashTests
function to account for v2 test format versionhashTests
function support the migration of test results across test plan versions using the v2 test format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving! There's a couple of minor comments but it all feels optional. I verified the tests are passing (big thank you for buffing up the test coverage), and also I rebuilt the app from scratch to verify that it was still able to compare test versions without introducing duplicates.
…st format version update so applicable results can be transferred over during phase update
* Rename testWithNoIds -> testWithOmittedAttributes
…ionally, now deleting found duplicates as there is an error when tested against prod data where unnecessary duplicates were created
); | ||
} else { | ||
// Remove any accidentally created TestPlanVersion rows created prior to migration | ||
await queryInterface.sequelize.query( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reviewers, found an issue during checks against production where several TestPlanVersions were created as duplicates (yet had non-matching hashedTests
, because of some failed sync between pushes I suppose).
Also broke this out into a separate utility because several migrations may have to make use this in the future as well. Immediately seeing a need for #863 to use this as well.
Included 6f8dfb9 in the recent staging push, which was required. It displays why this change is needed.
e832a86
to
3c6d020
Compare
…test format version to also include (an empty) assertionExceptions so hashes will remain in sync; include utility introduced in #880
hashTests
function support the migration of test results across test plan versions using the v2 test formathashTests
function to support the migration of test results across test plan versions using the v2 test format
…t format tests to be imported
…st results process described in #877; update dataManagement.test.js; update sample populate script to support testing v2 test format tests workflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates and accompanying expanded test coverage. I was able to confirm that this was functioning as expected by rebuilding the DB and running the unit tests. The new code also has greater clarity than what it replaces. Approving!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to approve a second time on this one. I like the idea of making it easy to recalculate the hashes, it does seem pretty likely it might become necessary down the line. I took a look at the broader changes to the tests as well and didn't see anything that rang any alarm bells. I see the tests are passing. Nice work!
* Update client/resources * Update graphql-schema.js and testsResolver * Update assertionResultsResolver.js * Update import-tests script to include assertion.assertionExceptions (0 level assertions will be considered internally as 'EXCLUDE') * Update getMetrics and queries to be aware of 'excluded' assertions for commands * Update import branch for testing * Update import branch for testing * Remove 'exclude' property check reliance on frontend * Revert graphql fragment usage * Fix missing renderableContent in anon viewer query * Rename instances of Command.settings to Command.atOperatingMode in graphql-schema.js * Include migration to update existing test plan versions using the v2 test format version to also include (an empty) assertionExceptions so hashes will remain in sync; include utility introduced in #880 * Move atOperatingMode setting to TestsService, getTests * Missing comma * Update comments with reasoning for filtering out assertions that can possibly have no ids * Update convertAssertionPriority usage * Revert test branch being used back to master * Break out in-line filter into function sufficiently support readability purposes --------- Co-authored-by: Stalgia Grigg <stalgia@bocoup.com>
This PR updates
aria.js
to account for properties to be ignored during a v2 test format version update so applicable results can be transferred over during phase update process.This should address the scenario described in #877 and produce the expected results along with the additional requirements: