Skip to content

chore(cdn): Improve acceptance tests#1315

Open
Fyusel wants to merge 1 commit intomainfrom
improve-cdn-acc-tests
Open

chore(cdn): Improve acceptance tests#1315
Fyusel wants to merge 1 commit intomainfrom
improve-cdn-acc-tests

Conversation

@Fyusel
Copy link
Contributor

@Fyusel Fyusel commented Mar 20, 2026

Use new structure.
STACKITTPR-467

Description

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)

@Fyusel Fyusel requested a review from a team as a code owner March 20, 2026 13:35
Use new structure.
STACKITTPR-467

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
@Fyusel Fyusel force-pushed the improve-cdn-acc-tests branch from 06fb259 to e062663 Compare March 20, 2026 13:36
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/cdn 0.00% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/cdn/customdomain 28.67% (+0.38%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/cdn/customdomain/datasource.go 36.71% (+1.77%) 79 (-4) 29 50 (-4) 👍

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/cdn/cdn_acc_test.go

Comment on lines -127 to -132
func makeCertAndKey(t *testing.T, organization string) (cert, key []byte) {
privateKey, err := rsa.GenerateKey(cryptoRand.Reader, 2048)
if err != nil {
t.Fatalf("failed to generate key: %s", err.Error())
}
template := x509.Certificate{
Copy link
Contributor

Choose a reason for hiding this comment

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

Was the usage of certificate and private key intentionally removed?

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