Fix/fix tests (#18)

* fix: fix and adjust tests to new api

* fix: add missing testdata file

* fix: add missing docs

* fix: ignore docs flow for now

* fix: fix  linting
This commit is contained in:
Marcel S. Henselin 2025-12-29 07:12:30 +01:00 committed by GitHub
parent 25fb4453f0
commit 5b6576da1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 513 additions and 340 deletions

View file

@ -270,7 +270,7 @@ func (r *instanceDataSource) Read(ctx context.Context, req datasource.ReadReques
}
var storage = &storageModel{}
if !(model.Storage.IsNull() || model.Storage.IsUnknown()) {
if !model.Storage.IsNull() && !model.Storage.IsUnknown() {
diags = model.Storage.As(ctx, storage, basetypes.ObjectAsOptions{})
resp.Diagnostics.Append(diags...)
if resp.Diagnostics.HasError() {
@ -279,7 +279,7 @@ func (r *instanceDataSource) Read(ctx context.Context, req datasource.ReadReques
}
var encryption = &encryptionModel{}
if !(model.Encryption.IsNull() || model.Encryption.IsUnknown()) {
if !model.Encryption.IsNull() && !model.Encryption.IsUnknown() {
diags = model.Encryption.As(ctx, encryption, basetypes.ObjectAsOptions{})
resp.Diagnostics.Append(diags...)
if resp.Diagnostics.HasError() {
@ -288,7 +288,7 @@ func (r *instanceDataSource) Read(ctx context.Context, req datasource.ReadReques
}
var network = &networkModel{}
if !(model.Network.IsNull() || model.Network.IsUnknown()) {
if !model.Network.IsNull() && !model.Network.IsUnknown() {
diags = model.Network.As(ctx, network, basetypes.ObjectAsOptions{})
resp.Diagnostics.Append(diags...)
if resp.Diagnostics.HasError() {