Skip to content

Conversation

@Manuelvaas
Copy link

@Manuelvaas Manuelvaas commented Jan 21, 2026

Description

relates to STACKITCLI-307 and #1214

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

Fixed tests and linter
relates to STACKITCLI-307 and #1214
relates to STACKITCLI-307 and #1214
tests added
network ids included in list of project NICs
}

// Truncate output
items := *resp.Items
Copy link
Member

Choose a reason for hiding this comment

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

Potential nil pointer dereference, take care of it please

Copy link
Member

Choose a reason for hiding this comment

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

@rubenhoenle rubenhoenle marked this pull request as ready for review January 27, 2026 10:12
@rubenhoenle rubenhoenle requested a review from a team as a code owner January 27, 2026 10:12
@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/network-interface/list 50.00% (-0.94%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/network-interface/list/list.go 50.00% (-0.94%) 80 (+27) 40 (+13) 40 (+14) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/stackitcloud/stackit-cli/internal/cmd/network-interface/list/list_test.go

if err != nil {
projectLabel = model.ProjectId
}
params.Printer.Outputf("No network interfaces found for project %q\n", projectLabel)
Copy link
Member

Choose a reason for hiding this comment

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

Same as in your other PR. This belongs into outputResult, else you will have invalid JSON/YAML output here.

networkLabel = *model.NetworkId
}
params.Printer.Info("No network interfaces found for network %q\n", networkLabel)
params.Printer.Outputf("No network interfaces found for network %q\n", networkLabel)
Copy link
Member

Choose a reason for hiding this comment

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

invalid JSON/YAML output, see comment above

args: args{},
wantErr: false,
},
{
Copy link
Member

Choose a reason for hiding this comment

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

can we have some more test-cases for the output result stuff please?

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