feat(integration): Add missing tests for misc commands and features#419
Conversation
There was a problem hiding this comment.
Pull request overview
Adds additional Go integration tests under cmd/unikraft/integration/ to cover previously untested CLI subcommands/flags and a few multi-step flows, expanding end-to-end coverage across volumes, services, resources, metros, instances, images, config, certificates, and raw API usage.
Changes:
- Added new integration test cases for volume attach
--readonlyand volumedelete-lockprotection. - Added new integration coverage for service edit shortcuts/patch operations, resource multi-type create/edit/delete flows, and metro get/quotas.
- Added new integration coverage for instance replicas creation, image copy to/from a local OCI archive, config get with an explicit config file, certificate creation from PEM file paths, and API
--data @fileusage.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cmd/unikraft/integration/volume_test.go | Adds volume attach --readonly verification and delete-lock protection test coverage. |
| cmd/unikraft/integration/service_test.go | Adds test coverage for service edit shortcuts and patch add/del behavior. |
| cmd/unikraft/integration/resource_test.go | Adds a multi-resource-type flow test using the generic resource command family. |
| cmd/unikraft/integration/metro_test.go | Introduces metro get tests including quota field selection. |
| cmd/unikraft/integration/instance_test.go | Adds a replicas-focused instance creation test case. |
| cmd/unikraft/integration/image_test.go | Adds coverage for copying to/from a local OCI archive and inspecting results. |
| cmd/unikraft/integration/config_test.go | Adds coverage for config get against an explicit config file path. |
| cmd/unikraft/integration/certificate_test.go | Adds coverage for creating certificates using shortcut flags with file inputs. |
| cmd/unikraft/integration/api_test.go | Adds coverage for api command --data @file behavior and cleanup via raw API delete. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Needs a go-sdk bump, otherwise seems that all is good |
dbedb7d to
622a0a8
Compare
|
Shi is cursed yo but at least kinda works now |
| // SPDX-License-Identifier: BSD-3-Clause | ||
| // Copyright (c) 2026, Unikraft GmbH and The Unikraft CLI Authors. | ||
| // Licensed under the BSD-3-Clause License (the "License"). | ||
| // You may not use this file except in compliance with the License. |
There was a problem hiding this comment.
Hm. Just noticed this is inconsistent, weird. Let's add this to the LICENSE.fragment.txt and fix all instances. Can be a follow-up.
There was a problem hiding this comment.
sure, in a separate PR
This adds different tests to commands that were missing them to cover as much as possible from the backlog. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
Also adapt fields to new formats. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
622a0a8 to
dbb6976
Compare
Especially useful in cleanups. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
d2a6a21 to
8631066
Compare
jedevc
left a comment
There was a problem hiding this comment.
Reviewed-by: Justin Chadwell <justin@unikraft.com>
Approved-by: Justin Chadwell <justin@unikraft.com>
This adds different tests to commands that were missing them to cover as much as possible from the backlog.