Skip to content

Conversation

@sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Aug 28, 2025

For update-related tests, we're going to move to a world where the initial system we start with has a target release set on it. We want to ensure that as part of these tests, we transition from the initial target release to the new one set up by these tests.

Add a setter to the SystemDescription called set_target_release_and_old_repo, and use that in all the update-related tests. As a nice benefit, we don't have to guess that the first non-initial target release generation is 2 (in fact it will soon become 3 since we'll initialize the system with a target release).

Depends on:

Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
@davepacheco
Copy link
Collaborator

For update-related tests, we're going to move to a world where the initial system we start with has a target release set on it.

Are we changing this for all tests? Is there some risk there since real systems don't start with it set?

@sunshowers
Copy link
Contributor Author

Are we changing this for all tests?

I was planning to update all the test_update_foo tests within planner.rs with this.

Is there some risk there since real systems don't start with it set?

Several reconfigurator-cli tests start with the system at install-dataset -- most notably test-mupdate-update-flow, but also test-target-release. I'm planning to keep those the same.

@sunshowers sunshowers changed the base branch from sunshowers/spr/main.3n-reconfigurator-planning-add-and-use-set_target_release_and_old_repo to main September 10, 2025 17:12
Created using spr 1.3.6-beta.1
Copy link
Contributor

@plotnick plotnick left a comment

Choose a reason for hiding this comment

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

Not having to guess that initial generation is great, thanks for this.

// This generation is successively incremented for each TUF repo. We use
// generation 2 to represent the first generation with a TUF repo
// attached.
let target_release_generation = Generation::from_u32(2);
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@sunshowers sunshowers merged commit af4a78e into main Sep 19, 2025
16 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/3n-reconfigurator-planning-add-and-use-set_target_release_and_old_repo branch September 19, 2025 17:49
charliepark pushed a commit that referenced this pull request Sep 19, 2025
…d_repo (#8938)

For update-related tests, we're going to move to a world where the
initial system we start with has a target release set on it. We want to
ensure that as part of these tests, we transition from the initial
target release to the new one set up by these tests.

Add a setter to the `SystemDescription` called
`set_target_release_and_old_repo`, and use that in all the
update-related tests. As a nice benefit, we don't have to guess that the
first non-initial target release generation is 2 (in fact it will soon
become 3 since we'll initialize the system with a target release).
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.

5 participants