Skip to content

Commit

Permalink
fuxp Net
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-toa committed Mar 15, 2023
1 parent 98ea3af commit f810912
Show file tree
Hide file tree
Showing 84 changed files with 278 additions and 390 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/acceptance_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Build go test
run: make test
- name: Run acceptance tests
run: make testacc
run: make test-net
env:
OUTSCALE_ACCESSKEYID: ${{ secrets.OSC_ACCESS_KEY }}
OUTSCALE_SECRETKEYID: ${{ secrets.OSC_SECRET_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions outscale/data_source_outscale_access_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccOutscaleDataSourceAccessKey_basic(t *testing.T) {
func TestAccOthers_DatasourceAccessKey_basic(t *testing.T) {
t.Parallel()
dataSourceName := "outscale_access_key.outscale_access_key"

Expand All @@ -28,7 +28,7 @@ func TestAccOutscaleDataSourceAccessKey_basic(t *testing.T) {
})
}

func TestAccOutscaleDataSourceAccessKey_withFilters(t *testing.T) {
func TestAccOthers_AccessKey_withFilters(t *testing.T) {
t.Parallel()
dataSourceName := "outscale_access_key.outscale_access_key"

Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_access_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccOutscaleDataSourceAccessKeys_basic(t *testing.T) {
func TestAccOthers_DataSourceAccessKeys_basic(t *testing.T) {
t.Parallel()
dataSourceName := "data.outscale_access_keys.outscale_access_key"

Expand All @@ -25,7 +25,7 @@ func TestAccOutscaleDataSourceAccessKeys_basic(t *testing.T) {
})
}

func TestAccOutscaleDataSourceAccessKeys_withFilters(t *testing.T) {
func TestAccOthers_DataSourceAccessKeys_withFilters(t *testing.T) {
t.Parallel()
dataSourceName := "data.outscale_access_keys.outscale_access_key"

Expand All @@ -49,7 +49,7 @@ func testAccClientAccessKeysDataSourceBasic() string {
resource "outscale_access_key" "outscale_access_key" {}
data "outscale_access_keys" "outscale_access_key" {
access_key_ids = ["${outscale_access_key.outscale_access_key.id}"]
access_key_ids = [outscale_access_key.outscale_access_key.id]
}
`
}
Expand All @@ -61,7 +61,7 @@ func testAccClientAccessKeysDataSourceWithFilters() string {
data "outscale_access_keys" "outscale_access_key" {
filter {
name = "access_key_ids"
values = ["${outscale_access_key.outscale_access_key.id}"]
values = [outscale_access_key.outscale_access_key.id]
}
}
`
Expand Down
2 changes: 1 addition & 1 deletion outscale/data_source_outscale_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccDataSourceAccount_basic(t *testing.T) {
func TestAccOthers_DataSourceAccount_basic(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand Down
2 changes: 1 addition & 1 deletion outscale/data_source_outscale_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccDataSourceAccounts_basic(t *testing.T) {
func TestAccOthers_DataSourceAccounts_basic(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand Down
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_api_access_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)

func TestAccDataOutscaleOAPIApiAccessRule_basic(t *testing.T) {
func TestAccOthers_DataOutscaleOAPIApiAccessRule_basic(t *testing.T) {
t.Parallel()
resourceName := "outscale_api_access_rule.rule_data"

Expand Down Expand Up @@ -78,15 +78,15 @@ resource "outscale_ca" "ca_rule" {
}
resource "outscale_api_access_rule" "rule_data" {
ca_ids = ["${outscale_ca.ca_rule.id}"]
ca_ids = [outscale_ca.ca_rule.id]
ip_ranges = ["192.4.2.32/16"]
description = "test api access rule"
}
data "outscale_api_access_rule" "api_access_rule" {
filter {
name = "api_access_rule_ids"
values = ["${outscale_api_access_rule.rule_data.id}"]
values = [outscale_api_access_rule.rule_data.id]
}
filter {
Expand Down
2 changes: 1 addition & 1 deletion outscale/data_source_outscale_ca_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/terraform-providers/terraform-provider-outscale/utils"
)

func TestAccDataOutscaleOAPICa_basic(t *testing.T) {
func TestAccOthers_DataOutscaleCa_basic(t *testing.T) {
resourceName := "outscale_ca.ca_test"

resource.Test(t, resource.TestCase{
Expand Down
2 changes: 1 addition & 1 deletion outscale/data_source_outscale_cas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/terraform-providers/terraform-provider-outscale/utils"
)

func TestAccDataOutscaleOAPICas_basic(t *testing.T) {
func TestAccOthers_DataOutscaleCas_basic(t *testing.T) {
resName := "outscale_ca.ca_test"

resource.Test(t, resource.TestCase{
Expand Down
10 changes: 5 additions & 5 deletions outscale/data_source_outscale_client_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/terraform-providers/terraform-provider-outscale/utils"
)

func TestAccOutscaleGatewayDatasource_basic(t *testing.T) {
func TestAccOthers_GatewayDatasource_basic(t *testing.T) {
t.Parallel()
rBgpAsn := utils.RandIntRange(64512, 65534)
value := fmt.Sprintf("testacc-%s", acctest.RandString(5))
Expand All @@ -25,7 +25,7 @@ func TestAccOutscaleGatewayDatasource_basic(t *testing.T) {
})
}

func TestAccOutscaleGatewayDatasource_withFilters(t *testing.T) {
func TestAccOthers_GatewayDatasource_withFilters(t *testing.T) {
t.Parallel()
// datasourceName := "data.outscale_client_gateway.test"
rBgpAsn := utils.RandIntRange(64512, 65534)
Expand All @@ -42,7 +42,7 @@ func TestAccOutscaleGatewayDatasource_withFilters(t *testing.T) {
})
}

func TestAccOutscaleGatewayDatasource_withFiltersNoLocalhost(t *testing.T) {
func TestAccOthers_GatewayDatasource_withFiltersNoLocalhost(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -69,7 +69,7 @@ func testAccClientGatewayDatasourceBasic(rBgpAsn int, value string) string {
}
data "outscale_client_gateway" "test" {
client_gateway_id = "${outscale_client_gateway.foo.id}"
client_gateway_id = outscale_client_gateway.foo.id
}
`, rBgpAsn, value)
}
Expand All @@ -90,7 +90,7 @@ func testAccClientGatewayDatasourceWithFilters(rBgpAsn int, value string) string
data "outscale_client_gateway" "test" {
filter {
name = "client_gateway_ids"
values = ["${outscale_client_gateway.foo.id}"]
values = [outscale_client_gateway.foo.id]
}
}
`, rBgpAsn, value)
Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_client_gateways_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccOutscaleClientGatewaysDatasource_basic(t *testing.T) {
func TestAccOthers_ClientGatewaysDatasource_basic(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Expand All @@ -18,7 +18,7 @@ func TestAccOutscaleClientGatewaysDatasource_basic(t *testing.T) {
})
}

func TestAccOutscaleClientGatewaysDatasource_withFilters(t *testing.T) {
func TestAccOthers_ClientGatewaysDatasource_withFilters(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Expand Down Expand Up @@ -49,7 +49,7 @@ const testAccOutscaleClientGatewaysDatasourceConfigBasic = `
}
data "outscale_client_gateways" "test" {
client_gateway_ids = ["${outscale_client_gateway.foo1.id}", "${outscale_client_gateway.foo2.id}"]
client_gateway_ids = [outscale_client_gateway.foo1.id, outscale_client_gateway.foo2.id]
}
`

Expand All @@ -74,7 +74,7 @@ const testAccOutscaleClientGatewaysDatasourceConfigWithFilters = `
data "outscale_client_gateways" "test" {
filter {
name = "client_gateway_ids"
values = ["${outscale_client_gateway.foo1.id}", "${outscale_client_gateway.foo2.id}"]
values = [outscale_client_gateway.foo1.id, outscale_client_gateway.foo2.id]
}
}
`
4 changes: 2 additions & 2 deletions outscale/data_source_outscale_dhcp_option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccOutscaleDHCPOption_basic(t *testing.T) {
func TestAccOthers_DHCPOption_basic(t *testing.T) {
t.Parallel()
resourceName := "outscale_dhcp_option.foo"
dataSourceName := "data.outscale_dhcp_option.test"
Expand Down Expand Up @@ -45,7 +45,7 @@ func TestAccOutscaleDHCPOption_basic(t *testing.T) {
})
}

func TestAccOutscaleDHCPOption_withFilters(t *testing.T) {
func TestAccOthers_DHCPOption_withFilters(t *testing.T) {
t.Parallel()
resourceName := "outscale_dhcp_option.foo"
dataSourceName := "data.outscale_dhcp_option.test"
Expand Down
4 changes: 2 additions & 2 deletions outscale/data_source_outscale_dhcp_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccOutscaleDHCPOptionsDatasource_basic(t *testing.T) {
func TestAccOthers_DHCPOptionsDatasource_basic(t *testing.T) {
t.Parallel()
value := fmt.Sprintf("test-acc-value-%s", acctest.RandString(5))

Expand All @@ -23,7 +23,7 @@ func TestAccOutscaleDHCPOptionsDatasource_basic(t *testing.T) {
})
}

func TestAccOutscaleDHCPOptionsDatasource_withFilters(t *testing.T) {
func TestAccOthers_DHCPOptionsDatasource_withFilters(t *testing.T) {
t.Parallel()
value := fmt.Sprintf("test-acc-value-%s", acctest.RandString(5))

Expand Down
2 changes: 1 addition & 1 deletion outscale/data_source_outscale_flexible_gpu_catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccDataSourceOutscaleOAPIFlexibleGpuCatalog_basic(t *testing.T) {
func TestAccOthers_DataSourceFlexibleGpuCatalog_basic(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand Down
11 changes: 5 additions & 6 deletions outscale/data_source_outscale_flexible_gpu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import (
"github.com/terraform-providers/terraform-provider-outscale/utils"
)

func TestAccDataSourceOutscaleOAPIFlexibleGpu_basic(t *testing.T) {
t.Parallel()
func TestAccOthers_DataSourceFlexibleGpu_basic(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand All @@ -26,17 +25,17 @@ func TestAccDataSourceOutscaleOAPIFlexibleGpu_basic(t *testing.T) {

func testAccDataSourceOutscaleOAPIFlexibleGpuConfig(region string) string {
return fmt.Sprintf(`
resource "outscale_flexible_gpu" "fGPU-1" {
resource "outscale_flexible_gpu" "dataGPU" {
model_name = "nvidia-p6"
generation = "v5"
subregion_name = "%sa"
delete_on_vm_deletion = true
}
data "outscale_flexible_gpu" "data_fGPU-1" {
data "outscale_flexible_gpu" "data_fGPU" {
filter {
name = "flexible_gpu_ids"
values = [outscale_flexible_gpu.fGPU-data1.flexible_gpu_id]
values = [outscale_flexible_gpu.dataGPU.flexible_gpu_id]
}
filter {
name = "delete_on_vm_deletion"
Expand All @@ -56,7 +55,7 @@ func testAccDataSourceOutscaleOAPIFlexibleGpuConfig(region string) string {
}
filter {
name = "subregion_names"
values = ["%[1]s"]
values = ["%[1]sa"]
}
}
`, region)
Expand Down
11 changes: 5 additions & 6 deletions outscale/data_source_outscale_flexible_gpus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import (
"github.com/terraform-providers/terraform-provider-outscale/utils"
)

func TestAccDataSourceOutscaleOAPIFlexibleGpus_basic(t *testing.T) {
t.Parallel()
func TestAccOthers_DataSourceFlexibleGpus_basic(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand All @@ -26,10 +25,10 @@ func TestAccDataSourceOutscaleOAPIFlexibleGpus_basic(t *testing.T) {

func testAccDataSourceOutscaleOAPIFlexibleGpusConfig(region string) string {
return fmt.Sprintf(`
resource "outscale_flexible_gpu" "fGPUS-1" {
resource "outscale_flexible_gpu" "fGPUS-1" {
model_name = "nvidia-p6"
generation = "v5"
subregion_name = "%sb"
subregion_name = "%sa"
delete_on_vm_deletion = true
}
Expand All @@ -56,8 +55,8 @@ func testAccDataSourceOutscaleOAPIFlexibleGpusConfig(region string) string {
}
filter {
name = "subregion_names"
values = ["%[1]s"]
values = ["%[1]sa"]
}
}
`, region, region)
`, region)
}
2 changes: 1 addition & 1 deletion outscale/data_source_outscale_image_export_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccOutscaleOAPIImageExportTaskDataSource_basic(t *testing.T) {
func TestAccVM_withImageExportTaskDataSource_basic(t *testing.T) {
omi := os.Getenv("OUTSCALE_IMAGEID")
imageName := acctest.RandomWithPrefix("test-image-name")

Expand Down
2 changes: 1 addition & 1 deletion outscale/data_source_outscale_image_export_tasks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func TestAccOutscaleOAPIImageExportTasksDataSource_basic(t *testing.T) {
func TestAccVM_withImageExportTasksDataSource_basic(t *testing.T) {
omi := os.Getenv("OUTSCALE_IMAGEID")
imageName := acctest.RandomWithPrefix("test-image-name")

Expand Down
Loading

0 comments on commit f810912

Please sign in to comment.