Skip to content

Commit 8ed47a0

Browse files
committed
fixed linter check
1 parent 98f66e7 commit 8ed47a0

7 files changed

+26
-25
lines changed

internal/service/odb/db_node_data_source_test.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ func TestAccODBDBNodeDataSource_basic(t *testing.T) {
4343
if testing.Short() {
4444
t.Skip("skipping long-running test in short mode")
4545
}
46+
publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress)
47+
if err != nil {
48+
t.Fatal(err)
49+
return
50+
}
4651
var dbNode odb.GetDbNodeOutput
4752
dataSourceName := "data.aws_odb_db_node.test"
4853
resource.ParallelTest(t, resource.TestCase{
@@ -54,7 +59,7 @@ func TestAccODBDBNodeDataSource_basic(t *testing.T) {
5459
CheckDestroy: dbNodeDataSourceTestEntity.testAccCheckDBNodeDestroyed(ctx),
5560
Steps: []resource.TestStep{
5661
{
57-
Config: dbNodeDataSourceTestEntity.dbNodeDataSourceBasicConfig(),
62+
Config: dbNodeDataSourceTestEntity.dbNodeDataSourceBasicConfig(publicKey),
5863
Check: resource.ComposeAggregateTestCheckFunc(
5964
dbNodeDataSourceTestEntity.testAccCheckDBNodeExists(ctx, dataSourceName, &dbNode),
6065
),
@@ -126,8 +131,8 @@ func (testDbNodeDataSourceTest) findVmCluster(ctx context.Context, conn *odb.Cli
126131
return nil
127132
}
128133

129-
func (testDbNodeDataSourceTest) dbNodeDataSourceBasicConfig() string {
130-
vmClusterConfig := dbNodeDataSourceTestEntity.vmClusterBasicConfig()
134+
func (testDbNodeDataSourceTest) dbNodeDataSourceBasicConfig(publicKey string) string {
135+
vmClusterConfig := dbNodeDataSourceTestEntity.vmClusterBasicConfig(publicKey)
131136

132137
return fmt.Sprintf(`
133138
%s
@@ -144,14 +149,10 @@ data "aws_odb_db_node" "test" {
144149
`, vmClusterConfig)
145150
}
146151

147-
func (testDbNodeDataSourceTest) vmClusterBasicConfig() string {
152+
func (testDbNodeDataSourceTest) vmClusterBasicConfig(publicKey string) string {
148153
exaInfraDisplayName := sdkacctest.RandomWithPrefix(dbNodeDataSourceTestEntity.exaDisplayNamePrefix)
149154
oracleDBNetDisplayName := sdkacctest.RandomWithPrefix(dbNodeDataSourceTestEntity.oracleDBNetworkDisplayNamePrefix)
150155
vmcDisplayName := sdkacctest.RandomWithPrefix(dbNodeDataSourceTestEntity.vmClusterDisplayNamePrefix)
151-
publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress)
152-
if err != nil {
153-
panic(err)
154-
}
155156
dsTfCodeVmCluster := fmt.Sprintf(`
156157
157158

internal/service/odb/db_nodes_list_data_source_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ func TestAccODBDBNodesListDataSource_basic(t *testing.T) {
4444
if testing.Short() {
4545
t.Skip("skipping long-running test in short mode")
4646
}
47-
47+
publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress)
48+
if err != nil {
49+
t.Fatal(err)
50+
return
51+
}
4852
var dbNodesList odb.ListDbNodesOutput
4953
dbNodesListsDataSourceName := "data.aws_odb_db_nodes_list.test"
5054
vmClusterListsResourceName := "aws_odb_cloud_vm_cluster.test"
@@ -58,7 +62,7 @@ func TestAccODBDBNodesListDataSource_basic(t *testing.T) {
5862
CheckDestroy: dbNodesListDataSourceTestEntity.testAccCheckDBNodesDestroyed(ctx),
5963
Steps: []resource.TestStep{
6064
{
61-
Config: dbNodesListDataSourceTestEntity.basicDBNodesListDataSource(),
65+
Config: dbNodesListDataSourceTestEntity.basicDBNodesListDataSource(publicKey),
6266
Check: resource.ComposeAggregateTestCheckFunc(
6367
dbNodesListDataSourceTestEntity.testAccCheckDBNodesListExists(ctx, vmClusterListsResourceName, &dbNodesList),
6468
resource.TestCheckResourceAttr(dbNodesListsDataSourceName, "aws_odb_db_nodes_list.db_nodes.#", strconv.Itoa(len(dbNodesList.DbNodes))),
@@ -133,8 +137,8 @@ func (dbNodesListDataSourceTest) findVmCluster(ctx context.Context, conn *odb.Cl
133137
return output.CloudVmCluster, nil
134138
}
135139

136-
func (dbNodesListDataSourceTest) basicDBNodesListDataSource() string {
137-
vmCluster := dbNodesListDataSourceTestEntity.vmClusterBasic()
140+
func (dbNodesListDataSourceTest) basicDBNodesListDataSource(publicKey string) string {
141+
vmCluster := dbNodesListDataSourceTestEntity.vmClusterBasic(publicKey)
138142
return fmt.Sprintf(`
139143
140144
%s
@@ -145,14 +149,10 @@ data "aws_odb_db_nodes_list" "test" {
145149
`, vmCluster)
146150
}
147151

148-
func (dbNodesListDataSourceTest) vmClusterBasic() string {
152+
func (dbNodesListDataSourceTest) vmClusterBasic(publicKey string) string {
149153
odbNetRName := sdkacctest.RandomWithPrefix(dbNodesListDataSourceTestEntity.oracleDBNetworkDisplayNamePrefix)
150154
exaInfraRName := sdkacctest.RandomWithPrefix(dbNodesListDataSourceTestEntity.exadataInfraDisplayNamePrefix)
151155
vmcDisplayName := sdkacctest.RandomWithPrefix(dbNodesListDataSourceTestEntity.vmClusterDisplayNamePrefix)
152-
publicKey, _, err := sdkacctest.RandSSHKeyPair(acctest.DefaultEmailAddress)
153-
if err != nil {
154-
panic(err)
155-
}
156156
return fmt.Sprintf(`
157157
158158
resource "aws_odb_network" "test" {

internal/service/odb/db_server_data_source_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var dbServerDataSourceTestEntity = testDbServerDataSourceTest{
3434
}
3535

3636
// Acceptance test access AWS and cost money to run.
37-
func TestAccODBDBServerDataSource(t *testing.T) {
37+
func TestAccODBDBServerDataSource_basic(t *testing.T) {
3838
ctx := acctest.Context(t)
3939
if testing.Short() {
4040
t.Skip("skipping long-running test in short mode")

website/docs/d/odb_db_node.html.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can find out more about Oracle Database@AWS from [User Guide](https://docs.a
1919
```terraform
2020
data "aws_odb_db_node" "example" {
2121
cloud_vm_cluster_id = "cloud_vm_cluster_id"
22-
id = "db_node_id"
22+
id = "db_node_id"
2323
}
2424
```
2525

@@ -28,7 +28,7 @@ data "aws_odb_db_node" "example" {
2828
The following arguments are required:
2929

3030
* `cloud_vm_cluster_id` - (Required) The unique identifier of the cloud vm cluster.
31-
* `id` - (Required) The unique identifier of db node associated with vm cluster.
31+
* `id` - (Required) The unique identifier of db node associated with vm cluster.
3232

3333
The following arguments are optional:
3434

@@ -64,4 +64,4 @@ This data source exports the following attributes in addition to the arguments a
6464
* `vnic2_id` - The OCID of the second VNIC.
6565
* `vnic_id` - The OCID of the VNIC.
6666
* `private_ip_address` - The private IP address assigned to the DB node.
67-
* `floating_ip_address` - The floating IP address assigned to the DB node.
67+
* `floating_ip_address` - The floating IP address assigned to the DB node.

website/docs/d/odb_db_nodes_list.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ This data source exports the following attributes in addition to the arguments a
6565
* `time_maintenance_window_start` - The start date and time of the maintenance window.
6666
* `total_cpu_core_count` - The total number of CPU cores reserved on the DB node.
6767
* `vnic_2_id` - The OCID of the second VNIC.
68-
* `vnic_id` - The OCID of the VNIC.
68+
* `vnic_id` - The OCID of the VNIC.

website/docs/d/odb_db_server.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can find out more about Oracle Database@AWS from [User Guide](https://docs.a
1919
```terraform
2020
data "aws_odb_db_server" "example" {
2121
cloud_exadata_infrastructure_id = "exadata_infra_id"
22-
id = "db_server_id"
22+
id = "db_server_id"
2323
}
2424
```
2525

@@ -56,4 +56,4 @@ This data source exports the following attributes in addition to the arguments a
5656
* `memory_size_in_gbs` - The allocated memory in GBs on the database server.
5757
* `shape` - The shape of the database server. The shape determines the amount of CPU, storage, and memory resources available.
5858
* `created_at` - The date and time when the database server was created.
59-
* `vm_cluster_ids` - The OCID of the VM clusters that are associated with the database server.
59+
* `vm_cluster_ids` - The OCID of the VM clusters that are associated with the database server.

website/docs/d/odb_db_servers_list.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ This data source exports the following attributes in addition to the arguments a
5959
* `shape` - The hardware system model of the Exadata infrastructure that the database server is hosted on. The shape determines the amount of CPU, storage, and memory resources available.
6060
* `status` - The current status of the database server.
6161
* `status_reason` - Additional information about the status of the database server.
62-
* `vm_cluster_ids` - The IDs of the VM clusters that are associated with the database server.
62+
* `vm_cluster_ids` - The IDs of the VM clusters that are associated with the database server.

0 commit comments

Comments
 (0)