-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathservice_engine_group_schema_test.go
57 lines (42 loc) · 1.76 KB
/
service_engine_group_schema_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package alb_test
import (
"context"
"testing"
fwdatasource "github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/orange-cloudavenue/terraform-provider-cloudavenue/internal/provider/alb"
)
// TODO : Comment or uncomment the following imports if you are using resources or/and datasources
/*
// Unit test for the schema of the resource cloudavenue_alb_AlbServiceEngineGroupDatasourceName
func TestAlbServiceEngineGroupDatasourceNameResourceSchema(t *testing.T) {
t.Parallel()
ctx := context.Background()
schemaResponse := &fwresource.SchemaResponse{}
// Instantiate the resource.Resource and call its Schema method
alb.NewAlbServiceEngineGroupDatasourceNameResource().Schema(ctx, fwresource.SchemaRequest{}, schemaResponse)
if schemaResponse.Diagnostics.HasError() {
t.Fatalf("Schema method diagnostics: %+v", schemaResponse.Diagnostics)
}
// Validate the schema
diagnostics := schemaResponse.Schema.ValidateImplementation(ctx)
if diagnostics.HasError() {
t.Fatalf("Schema validation diagnostics: %+v", diagnostics)
}
}
*/
// Unit test for the schema of the datasource cloudavenue_alb_AlbServiceEngineGroupDatasourceName
func TestALBServiceEngineGroupDataSourceSchema(t *testing.T) {
t.Parallel()
ctx := context.Background()
schemaResponse := &fwdatasource.SchemaResponse{}
// Instantiate the datasource.Datasource and call its Schema method
alb.NewServiceEngineGroupDataSource().Schema(ctx, fwdatasource.SchemaRequest{}, schemaResponse)
if schemaResponse.Diagnostics.HasError() {
t.Fatalf("Schema method diagnostics: %+v", schemaResponse.Diagnostics)
}
// Validate the schema
diagnostics := schemaResponse.Schema.ValidateImplementation(ctx)
if diagnostics.HasError() {
t.Fatalf("Schema validation diagnostics: %+v", diagnostics)
}
}