Skip to content

feat(integration): Add missing tests for misc commands and features#419

Merged
craciunoiuc merged 3 commits into
prod-stagingfrom
craciunoiuc/add-missing-integ-tests
Jul 23, 2026
Merged

feat(integration): Add missing tests for misc commands and features#419
craciunoiuc merged 3 commits into
prod-stagingfrom
craciunoiuc/add-missing-integ-tests

Conversation

@craciunoiuc

Copy link
Copy Markdown
Contributor

This adds different tests to commands that were missing them to cover as much as possible from the backlog.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 --readonly and volume delete-lock protection.
  • 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 @file usage.

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.

Comment thread cmd/unikraft/integration/instance_test.go
Comment thread cmd/unikraft/integration/api_test.go
@craciunoiuc

Copy link
Copy Markdown
Contributor Author

Needs a go-sdk bump, otherwise seems that all is good

@craciunoiuc
craciunoiuc force-pushed the craciunoiuc/add-missing-integ-tests branch from dbedb7d to 622a0a8 Compare July 14, 2026 13:48
@craciunoiuc

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure, in a separate PR

Comment thread cmd/unikraft/integration/api_test.go Outdated
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>
@craciunoiuc
craciunoiuc force-pushed the craciunoiuc/add-missing-integ-tests branch from 622a0a8 to dbb6976 Compare July 23, 2026 07:29
@craciunoiuc
craciunoiuc requested a review from jedevc July 23, 2026 07:29
Especially useful in cleanups.

Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
@craciunoiuc
craciunoiuc force-pushed the craciunoiuc/add-missing-integ-tests branch from d2a6a21 to 8631066 Compare July 23, 2026 10:00

@jedevc jedevc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed-by: Justin Chadwell <justin@unikraft.com>
Approved-by: Justin Chadwell <justin@unikraft.com>

@craciunoiuc
craciunoiuc merged commit ac81a99 into prod-staging Jul 23, 2026
13 checks passed
@craciunoiuc
craciunoiuc deleted the craciunoiuc/add-missing-integ-tests branch July 23, 2026 10:07
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.

4 participants