@@ -34,7 +34,7 @@ var dbServerDataSourceTestEntity = testDbServerDataSourceTest{
34
34
}
35
35
36
36
// Acceptance test access AWS and cost money to run.
37
- func TestAccODBDbServerDataSource (t * testing.T ) {
37
+ func TestAccODBDBServerDataSource (t * testing.T ) {
38
38
ctx := acctest .Context (t )
39
39
if testing .Short () {
40
40
t .Skip ("skipping long-running test in short mode" )
@@ -48,38 +48,38 @@ func TestAccODBDbServerDataSource(t *testing.T) {
48
48
},
49
49
ErrorCheck : acctest .ErrorCheck (t , names .ODBServiceID ),
50
50
ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories ,
51
- CheckDestroy : dbServerDataSourceTestEntity .testAccCheckDbServersDestroyed (ctx ),
51
+ CheckDestroy : dbServerDataSourceTestEntity .testAccCheckDBServersDestroyed (ctx ),
52
52
Steps : []resource.TestStep {
53
53
{
54
- Config : dbServerDataSourceTestEntity .basicDbServerDataSourceConfig (),
54
+ Config : dbServerDataSourceTestEntity .basicDBServerDataSourceConfig (),
55
55
Check : resource .ComposeAggregateTestCheckFunc (
56
- dbServerDataSourceTestEntity .testAccCheckDbServerExists (ctx , dataSourceName , & dbServer ),
56
+ dbServerDataSourceTestEntity .testAccCheckDBServerExists (ctx , dataSourceName , & dbServer ),
57
57
),
58
58
},
59
59
},
60
60
})
61
61
}
62
62
63
- func (testDbServerDataSourceTest ) testAccCheckDbServerExists (ctx context.Context , name string , output * odb.GetDbServerOutput ) resource.TestCheckFunc {
63
+ func (testDbServerDataSourceTest ) testAccCheckDBServerExists (ctx context.Context , name string , output * odb.GetDbServerOutput ) resource.TestCheckFunc {
64
64
return func (s * terraform.State ) error {
65
65
rs , ok := s .RootModule ().Resources [name ]
66
66
if ! ok {
67
- return create .Error (names .ODB , create .ErrActionCheckingExistence , tfodb .DSNameDbServer , name , errors .New ("not found" ))
67
+ return create .Error (names .ODB , create .ErrActionCheckingExistence , tfodb .DSNameDBServer , name , errors .New ("not found" ))
68
68
}
69
69
conn := acctest .Provider .Meta ().(* conns.AWSClient ).ODBClient (ctx )
70
70
var dbServerId = rs .Primary .ID
71
71
var attributes = rs .Primary .Attributes
72
72
exaId := attributes ["exadata_infrastructure_id" ]
73
- resp , err := dbServerDataSourceTestEntity .findDbServer (ctx , conn , & dbServerId , & exaId )
73
+ resp , err := dbServerDataSourceTestEntity .findDBServer (ctx , conn , & dbServerId , & exaId )
74
74
if err != nil {
75
- return create .Error (names .ODB , create .ErrActionCheckingExistence , tfodb .DSNameDbServer , rs .Primary .ID , err )
75
+ return create .Error (names .ODB , create .ErrActionCheckingExistence , tfodb .DSNameDBServer , rs .Primary .ID , err )
76
76
}
77
77
* output = * resp
78
78
return nil
79
79
}
80
80
}
81
81
82
- func (testDbServerDataSourceTest ) testAccCheckDbServersDestroyed (ctx context.Context ) resource.TestCheckFunc {
82
+ func (testDbServerDataSourceTest ) testAccCheckDBServersDestroyed (ctx context.Context ) resource.TestCheckFunc {
83
83
return func (s * terraform.State ) error {
84
84
conn := acctest .Provider .Meta ().(* conns.AWSClient ).ODBClient (ctx )
85
85
for _ , rs := range s .RootModule ().Resources {
@@ -91,9 +91,9 @@ func (testDbServerDataSourceTest) testAccCheckDbServersDestroyed(ctx context.Con
91
91
return nil
92
92
}
93
93
if err != nil {
94
- return create .Error (names .ODB , create .ErrActionCheckingDestroyed , tfodb .DSNameDbServer , rs .Primary .ID , err )
94
+ return create .Error (names .ODB , create .ErrActionCheckingDestroyed , tfodb .DSNameDBServer , rs .Primary .ID , err )
95
95
}
96
- return create .Error (names .ODB , create .ErrActionCheckingDestroyed , tfodb .DSNameDbServer , rs .Primary .ID , errors .New ("not destroyed" ))
96
+ return create .Error (names .ODB , create .ErrActionCheckingDestroyed , tfodb .DSNameDBServer , rs .Primary .ID , errors .New ("not destroyed" ))
97
97
}
98
98
return nil
99
99
}
@@ -119,7 +119,7 @@ func (testDbServerDataSourceTest) findExaInfra(ctx context.Context, conn *odb.Cl
119
119
return nil
120
120
}
121
121
122
- func (testDbServerDataSourceTest ) findDbServer (ctx context.Context , conn * odb.Client , dbServerId * string , exaInfraId * string ) (* odb.GetDbServerOutput , error ) {
122
+ func (testDbServerDataSourceTest ) findDBServer (ctx context.Context , conn * odb.Client , dbServerId * string , exaInfraId * string ) (* odb.GetDbServerOutput , error ) {
123
123
inputWithExaId := odb.GetDbServerInput {
124
124
DbServerId : dbServerId ,
125
125
CloudExadataInfrastructureId : exaInfraId ,
@@ -131,7 +131,7 @@ func (testDbServerDataSourceTest) findDbServer(ctx context.Context, conn *odb.Cl
131
131
return output , nil
132
132
}
133
133
134
- func (testDbServerDataSourceTest ) basicDbServerDataSourceConfig () string {
134
+ func (testDbServerDataSourceTest ) basicDBServerDataSourceConfig () string {
135
135
exaInfraDisplayName := sdkacctest .RandomWithPrefix (dbServersListDataSourceTestEntity .displayNamePrefix )
136
136
exaInfra := dbServerDataSourceTestEntity .exaInfra (exaInfraDisplayName )
137
137
0 commit comments