Skip to content

Conversation

@dcookspi
Copy link
Collaborator

This adds get_all_tests() method to the Package, Spec etc. APIs to allow a build's test specs to be accessed from a build spec (a v0::Spec). Build spec's have the data aready, but accessing it is a bit convoluted without these changes.

…'s test specs to be accessed from a build spec (a v0::Spec)

Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
@dcookspi dcookspi self-assigned this Oct 23, 2025
@dcookspi dcookspi added the enhancement New feature or request label Oct 23, 2025
@dcookspi dcookspi requested review from jrray and rydrman October 23, 2025 18:54
@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/spk-schema/src/package.rs 0.00% 9 Missing ⚠️
crates/spk-schema/src/spec.rs 0.00% 4 Missing ⚠️
crates/spk-schema/src/v0/spec.rs 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

}

fn get_all_tests(&self) -> Vec<SpecTest> {
self.tests.clone().into_iter().map(SpecTest::V0).collect()
Copy link
Collaborator

Choose a reason for hiding this comment

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

TestSpec to SpecTest? 🙃

Cow::Borrowed(&self.install.requirements)
}

fn get_all_tests(&self) -> Vec<SpecTest> {
Copy link
Collaborator

@jrray jrray Oct 23, 2025

Choose a reason for hiding this comment

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

I approved already, but I'm wondering if it is worth the effort to make it so this can borrow instead of clone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants