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

migrator: end-to-end test #956

Merged
merged 2 commits into from
Jul 2, 2020
Merged

migrator: end-to-end test #956

merged 2 commits into from
Jul 2, 2020

Conversation

webern
Copy link
Contributor

@webern webern commented Jun 23, 2020

Issue number:

Related to #91 #905 #930

Description of changes

Move most everything to src/run.rs and add a file src/run_tests.rs which contains a migrator end-to-end test.

Testing done:

Ran the unit tests. Also ran a Bottlerocket instance and did an upgrade/downgrade test with test migrations.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@webern
Copy link
Contributor Author

webern commented Jun 24, 2020

webern force-pushed the webern:migrator-test branch from b3f4c9f to 9dc1666 9 minutes ago

Re-organize using run.rs

webern force-pushed the webern:migrator-test branch from 9dc1666 to 21a0ea4 6 minutes ago

Rebase.

Still need to fix an oops in Cargo.toml

@webern
Copy link
Contributor Author

webern commented Jun 24, 2020

webern force-pushed the webern:migrator-test branch from 21a0ea4 to c3af73d now

Fix an oops in Cargo.toml

@webern
Copy link
Contributor Author

webern commented Jun 24, 2020

webern force-pushed the webern:migrator-test branch from c3af73d to e169785

Fix another oops (actually remove the test from run.rs instead of having it duplicated in both run.rs and run_test.rs).

@webern webern requested a review from tjkirch June 24, 2020 17:09
@webern
Copy link
Contributor Author

webern commented Jun 25, 2020

webern force-pushed the webern:migrator-test branch from e169785 to 5f7f431

Organizes the test in the way that @tjkirch recommend (once I finally understood!) Also uses the new version of pentacle and uses a script instead of calling out to rustc

webern force-pushed the webern:migrator-test branch from 5f7f431 to f6061b8

Deletes a stray file.

I still need to go through comments from #930 and try to transfer any of them over to here.

@webern
Copy link
Contributor Author

webern commented Jun 25, 2020

webern force-pushed the webern:migrator-test branch from f6061b8 to 72a156d

Forgot a thing in Cargo.toml

@webern
Copy link
Contributor Author

webern commented Jun 26, 2020

webern force-pushed the webern:migrator-test branch from 72a156d to a8a2c5f

Gawd, sorry for the flailage. This one should actually have the changes that include pentacle and uses a bash script. I have too many branches on too many machines!

Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

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

LGTM assuming your remaining checks.

sources/api/migration/migrator/src/test.rs Outdated Show resolved Hide resolved
sources/api/migration/migrator/src/test.rs Outdated Show resolved Hide resolved
sources/api/migration/migrator/src/test.rs Show resolved Hide resolved
sources/api/migration/migrator/src/test.rs Outdated Show resolved Hide resolved
sources/api/migration/migrator/src/test.rs Outdated Show resolved Hide resolved
@webern
Copy link
Contributor Author

webern commented Jun 26, 2020

webern force-pushed the webern:migrator-test branch from a8a2c5f to 678f916

Fixes a couple of @tjkirch comments.

@webern
Copy link
Contributor Author

webern commented Jun 26, 2020

webern force-pushed the webern:migrator-test branch from 678f916 to 3d3d8d6

Fix a comment.

@webern
Copy link
Contributor Author

webern commented Jun 28, 2020

webern force-pushed the webern:migrator-test branch from 3d3d8d6 to 5296316

Moves create_new_datastore from storewolf main to a storewolf lib.rs file. This eliminates code duplication in the migrator test.

@webern
Copy link
Contributor Author

webern commented Jun 28, 2020

webern force-pushed the webern:migrator-test branch from 5296316 to 6c03e6d

test_data not pub

Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

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

Would you please confirm in the testing section that you ran an instance and checked the data store that storewolf creates? (And normal behavior we test...)

sources/api/storewolf/src/main.rs Outdated Show resolved Hide resolved
@webern
Copy link
Contributor Author

webern commented Jul 1, 2020

webern force-pushed the webern:migrator-test branch from 6c03e6d to b372001

Restore Option in storewolf function.

@webern
Copy link
Contributor Author

webern commented Jul 1, 2020

webern force-pushed the webern:migrator-test branch from b372001 to dd79ba2

rebase develop

@webern
Copy link
Contributor Author

webern commented Jul 1, 2020

webern force-pushed the webern:migrator-test branch from dd79ba2 to 9fcfb47

Change a comment.

@webern webern requested a review from tjkirch July 1, 2020 20:46
@webern webern marked this pull request as ready for review July 1, 2020 20:47
@webern webern merged commit 53dbc37 into bottlerocket-os:develop Jul 2, 2020
@webern webern deleted the migrator-test branch January 13, 2021 19:43
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.

3 participants