Skip to content

chore(serverbackup): switch to new SDK structure#1375

Open
GokceGK wants to merge 4 commits intomainfrom
serverbackup-sdk-update
Open

chore(serverbackup): switch to new SDK structure#1375
GokceGK wants to merge 4 commits intomainfrom
serverbackup-sdk-update

Conversation

@GokceGK
Copy link
Copy Markdown
Contributor

@GokceGK GokceGK commented Apr 14, 2026

Description

relates to STACKITTPR-574

Checklist

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

@GokceGK GokceGK requested a review from a team as a code owner April 14, 2026 12:44
@github-actions
Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup 0.00% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/enable 8.33% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/schedule 14.33% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/utils 75.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/enable/datasource.go 14.58% (ø) 48 7 41
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/enable/resource.go 5.83% (ø) 120 7 113
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/schedule/resource.go 13.89% (ø) 252 35 217
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/schedule/schedule_datasource.go 0.00% (ø) 41 0 41
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/schedule/schedules_datasource.go 26.79% (ø) 56 15 41
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/utils/util.go 75.00% (ø) 8 6 2

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/terraform-provider-stackit/stackit/internal/services/serverbackup/enable/datasource_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/enable/resource_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/schedule/resource_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/schedule/schedules_datasource_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/serverbackup_acc_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverbackup/utils/util_test.go

}
if schedule.Id == nil {
if schedule.Id == 0 {
return fmt.Errorf("response id is nil")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Error message does not match check.

Also not sure if we should just remove this check. API docs sadly only specify integer for schedule.Id but not what valid values are, so I'd accept 0 here as valid. The old implementation would have accepted 0.

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.

yes, you are right. I think I will remove this check.

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.

2 participants