Skip to content
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 regression test input YAML to current YAML version #2011

Merged

Conversation

floehopper
Copy link
Contributor

The version of YAML has changed since these files were generated and the
newer version seems to generate slightly different YAML output e.g. it uses
single-quotes instead of double-quotes.

Because of this, when we make a change and regenerate these files, it's
difficult to see the woods for the trees. By loading and saving all the YAML
files in this PR, I hope that it will be easier to see what's changed in
later commits.

@chrisroos
Copy link
Contributor

Loading and saving all the files has removed some of the comments that were added to describe why certain values were chosen:

  • test/data/estimate-self-assessment-penalties-questions-and-responses.yml
  • test/data/help-if-you-are-arrested-abroad-questions-and-responses.yml
  • test/data/landlord-immigration-check-questions-and-responses.yml
  • test/data/legalisation-document-checker-questions-and-responses.yml
  • test/data/maternity-paternity-calculator-questions-and-responses.yml
  • test/data/overseas-passports-questions-and-responses.yml
  • test/data/register-a-birth-questions-and-responses.yml
  • test/data/register-a-death-questions-and-responses.yml
  • test/data/simplified-expenses-checker-questions-and-responses.yml
  • test/data/state-pension-topup-questions-and-responses.yml
  • test/data/uk-benefits-abroad-questions-and-responses.yml

Do you think we should try to retain those?

@floehopper
Copy link
Contributor Author

Oops! Yes. I'll sort that now. Well spotted!

@floehopper floehopper force-pushed the update-regression-test-input-yaml-to-current-yaml-version branch from 55bab67 to 72bc610 Compare October 15, 2015 10:09
@floehopper
Copy link
Contributor Author

I've updated the middle "Update YAML files using current YAML version" commit to include manually re-adding the comments and updated the commit message to explain how I did it. I've then force-pushed.

@chrisroos
Copy link
Contributor

Looks good to me, although presumably you'll need to regenerate all the checksum data too?

@floehopper
Copy link
Contributor Author

Yes, I'll update checksums now and get the PR merged. Thanks.

@floehopper floehopper force-pushed the update-regression-test-input-yaml-to-current-yaml-version branch from 72bc610 to 0d1d0ca Compare October 15, 2015 10:44
@floehopper
Copy link
Contributor Author

I've just added a commit which updates the checksums and force-pushed in preparation for merging.

The version of YAML has changed since these files were generated and the newer
version seems to generate slightly different YAML output e.g. it uses single-
quotes instead of double-quotes.

Because of this, when we make a change and regenerate these files, it's
difficult to see the woods for the trees. By loading and saving all the YAML
files in this commit, I hope that it will be easier to see what's changed in
later commits.

Some of the `*-questions-and-responses.yml` files included comments which
would've been lost in this automated process. So I ran the following command
to identify them:

    grep -R "#" test/data/*

I then ran the following command to do the automatic update:

    rails r script/update-yaml.rb

And finally I manually edited the files to re-add the comments identified
above. I re-ran the `grep` command to check I hadn't missed any comments.
This reverts commit edcd63e.

Now that I've used this script it is surplus to requirements.
@floehopper floehopper force-pushed the update-regression-test-input-yaml-to-current-yaml-version branch from 0d1d0ca to c7f1d7c Compare October 15, 2015 12:42
@floehopper
Copy link
Contributor Author

I've just rebased this against master and force-pushed in preparation for merging.

floehopper added a commit that referenced this pull request Oct 15, 2015
…aml-to-current-yaml-version

Update regression test input YAML to current YAML version
@floehopper floehopper merged commit 35525cf into master Oct 15, 2015
@floehopper floehopper deleted the update-regression-test-input-yaml-to-current-yaml-version branch October 15, 2015 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants