Alpha (#4)
* chore: initial push to be able to work together * chore: add missing wait folder * chore: add missing folders * chore: cleanup alpha branch * feat: mssql alpha instance (#2) * fix: remove unused attribute types and functions from backup models * fix: update API client references to use sqlserverflexalpha package * fix: update package references to use sqlserverflexalpha and modify user data source model * fix: add sqlserverflexalpha user data source to provider * fix: add sqlserverflexalpha user resource and update related functionality * chore: add stackit_sqlserverflexalpha_user resource and instance_id variable * fix: refactor sqlserverflexalpha user resource and enhance schema with status and default_database --------- Co-authored-by: Andre Harms <andre.harms@stackit.cloud> Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud> * feat: add sqlserver instance * chore: fixing tests * chore: update docs --------- Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud> Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
This commit is contained in:
parent
45073a716b
commit
2733834fc9
351 changed files with 62744 additions and 3 deletions
58
pkg/postgresflexalpha/model_instance_network_test.go
Normal file
58
pkg/postgresflexalpha/model_instance_network_test.go
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
PostgreSQL Flex API
|
||||
|
||||
This is the documentation for the STACKIT Postgres Flex service
|
||||
|
||||
API version: 3alpha1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package postgresflexalpha
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// isEnum
|
||||
|
||||
func TestInstanceNetworkAccessScope_UnmarshalJSON(t *testing.T) {
|
||||
type args struct {
|
||||
src []byte
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: `success - possible enum value no. 1`,
|
||||
args: args{
|
||||
src: []byte(`"PUBLIC"`),
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: `success - possible enum value no. 2`,
|
||||
args: args{
|
||||
src: []byte(`"SNA"`),
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "fail",
|
||||
args: args{
|
||||
src: []byte("\"FOOBAR\""),
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
v := InstanceNetworkAccessScope("")
|
||||
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
||||
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue