Skip to content

Commit

Permalink
Update dependencies and fix test function names
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro J. Nuñez Madrazo <[email protected]>
  • Loading branch information
alejandrojnm committed Feb 2, 2024
1 parent 4d5ee40 commit ecb4f55
Show file tree
Hide file tree
Showing 35 changed files with 64 additions and 60 deletions.
4 changes: 2 additions & 2 deletions civo/database/datasource_database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

// DataSourceCivoDatabase_basic is used to test the data source
func DataSourceCivoDatabase_basic(t *testing.T) {
// TestAccDataSourceCivoDatabase_basic is used to test the data source
func TestAccDataSourceCivoDatabase_basic(t *testing.T) {
datasourceName := "data.civo_database.foobar"
name := acctest.RandomWithPrefix("database")

Expand Down
8 changes: 4 additions & 4 deletions civo/database/datasource_database_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

// DataSourceCivoDatabaseVersion_basic - Test the data source for database version
func DataSourceCivoDatabaseVersion_basic(t *testing.T) {
// TestAccDataSourceCivoDatabaseVersion_basic - Test the data source for database version
func TestAccDataSourceCivoDatabaseVersion_basic(t *testing.T) {
datasourceName := "data.civo_database_version.foobar"

resource.Test(t, resource.TestCase{
Expand All @@ -28,8 +28,8 @@ func DataSourceCivoDatabaseVersion_basic(t *testing.T) {
})
}

// DataSourceCivoDatabaseVersion_WithFilterAndSort - Test the data source for database version with filter and sort
func DataSourceCivoDatabaseVersion_WithFilterAndSort(t *testing.T) {
// TestAccDataSourceCivoDatabaseVersion_WithFilterAndSort - Test the data source for database version with filter and sort
func TestAccDataSourceCivoDatabaseVersion_WithFilterAndSort(t *testing.T) {
datasourceName := "data.civo_database_version.foobar"

resource.Test(t, resource.TestCase{
Expand Down
4 changes: 2 additions & 2 deletions civo/database/resource_database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// CivoDatabase_basic is used to test the database resource
func CivoDatabase_basic(t *testing.T) {
func TestAccCivoDatabase_basic(t *testing.T) {
var database civogo.Database

// generate a random name for each test run
Expand Down Expand Up @@ -47,7 +47,7 @@ func CivoDatabase_basic(t *testing.T) {
}

// CivoDatabase_update is used to test the database resource
func CivoDatabase_update(t *testing.T) {
func TestAccCivoDatabase_update(t *testing.T) {
var database civogo.Database

// generate a random name for each test run
Expand Down
3 changes: 2 additions & 1 deletion civo/dns/datasource_dns_domain_name_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func DataSourceCivoDnsDomainName(t *testing.T) {
// TestAccCivoDNSDomainNameDataSource_basic is a basic test case for a DNS Domain Name data source.
func TestAccDataSourceCivoDnsDomainName(t *testing.T) {
datasourceName := "data.civo_dns_domain_name.domain"
domain := acctest.RandomWithPrefix("domian") + ".com"

Expand Down
3 changes: 2 additions & 1 deletion civo/dns/datasource_dns_domain_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func DataSourceCivoDNSDomainRecord_basic(t *testing.T) {
// TestAccDataSourceCivoDNSDomainRecord_basic is a basic test case for a DNS domain record data source.
func TestAccDataSourceCivoDNSDomainRecord_basic(t *testing.T) {
datasourceName := "data.civo_dns_domain_record.record"
domain := acctest.RandomWithPrefix("recordtest") + ".com"

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

func CivoDNSDomainName_importBasic(t *testing.T) {
func TestAccCivoDNSDomainName_importBasic(t *testing.T) {
resourceName := "civo_dns_domain_name.foobar"
domainName := fmt.Sprintf("foobar-test-terraform-%s.com", acctest.RandString(10))

Expand Down
2 changes: 1 addition & 1 deletion civo/dns/import_dns_domain_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

func CivoDNSDomainRecord_importBasic(t *testing.T) {
func TestAccCivoDNSDomainRecord_importBasic(t *testing.T) {
resourceName := "civo_dns_domain_record.www"
var domainName = acctest.RandomWithPrefix("tf-test-record") + ".example"
var recordName = acctest.RandomWithPrefix("record")
Expand Down
4 changes: 2 additions & 2 deletions civo/dns/resource_dns_domain_name_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// example.Widget represents a concrete Go type that represents an API resource
func CivoDNSDomainName_basic(t *testing.T) {
func TestAccCivoDNSDomainName_basic(t *testing.T) {
var domain civogo.DNSDomain

// generate a random name for each test run
Expand Down Expand Up @@ -41,7 +41,7 @@ func CivoDNSDomainName_basic(t *testing.T) {
})
}

func CivoDNSDomainName_update(t *testing.T) {
func TestAccCivoDNSDomainName_update(t *testing.T) {
var domain civogo.DNSDomain

// generate a random name for each test run
Expand Down
6 changes: 3 additions & 3 deletions civo/dns/resource_dns_domain_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

// example.Widget represents a concrete Go type that represents an API resource
func CivoDNSDomainNameRecord_basic(t *testing.T) {
// TestAccCivoDNSDomainNameRecord_basic tests the basic functionality of the domain record resource
func TestAccCivoDNSDomainNameRecord_basic(t *testing.T) {
var domainRecord civogo.DNSRecord

// generate a random name for each test run
Expand Down Expand Up @@ -42,7 +42,7 @@ func CivoDNSDomainNameRecord_basic(t *testing.T) {
})
}

func CivoDNSDomainNameRecord_update(t *testing.T) {
func TestAccCivoDNSDomainNameRecord_update(t *testing.T) {
var domainRecord civogo.DNSRecord

// generate a random name for each test run
Expand Down
2 changes: 1 addition & 1 deletion civo/firewall/datasource_firewall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func DataSourceCivoFirewall_basic(t *testing.T) {
func TestAccDataSourceCivoFirewall_basic(t *testing.T) {
datasourceName := "data.civo_firewall.foobar"
name := acctest.RandomWithPrefix("net-test")

Expand Down
6 changes: 3 additions & 3 deletions civo/firewall/resource_firewall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// example.Widget represents a concrete Go type that represents an API resource
func CivoFirewall_basic(t *testing.T) {
func TestAccCivoFirewall_basic(t *testing.T) {
var firewall civogo.Firewall

// generate a random name for each test run
Expand Down Expand Up @@ -42,7 +42,7 @@ func CivoFirewall_basic(t *testing.T) {
})
}

func CivoFirewallWithIngressEgress_basic(t *testing.T) {
func TestAccCivoFirewallWithIngressEgress_basic(t *testing.T) {
var firewall civogo.Firewall

// generate a random name for each test run
Expand Down Expand Up @@ -79,7 +79,7 @@ func CivoFirewallWithIngressEgress_basic(t *testing.T) {
})
}

func CivoFirewall_update(t *testing.T) {
func TestAccCivoFirewall_update(t *testing.T) {
var firewall civogo.Firewall

// generate a random name for each test run
Expand Down
4 changes: 2 additions & 2 deletions civo/instances/datasource_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func DataSourceCivoInstance_basic(t *testing.T) {
func TestAccDataSourceCivoInstance_basic(t *testing.T) {
datasourceName := "data.civo_instance.foobar"
name := acctest.RandomWithPrefix("instance") + ".com"

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

func DataSourceCivoInstanceByID_basic(t *testing.T) {
func TestAccDataSourceCivoInstanceByID_basic(t *testing.T) {
datasourceName := "data.civo_instance.foobar"
name := acctest.RandomWithPrefix("instance") + ".com"

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

func DataSourceCivoInstances_basic(t *testing.T) {
func TestAccDataSourceCivoInstances_basic(t *testing.T) {
var instanceHostname = acctest.RandomWithPrefix("tf-test")
var instanceHostname2 = acctest.RandomWithPrefix("tf-test")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// example.Widget represents a concrete Go type that represents an API resource
func CivoInstanceReservedIPAssignment_basic(t *testing.T) {
func TestAccCivoInstanceReservedIPAssignment_basic(t *testing.T) {
var ip civogo.IP
var instance civogo.Instance

Expand Down
11 changes: 6 additions & 5 deletions civo/instances/resource_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

// example.Widget represents a concrete Go type that represents an API resource
func CivoInstance_basic(t *testing.T) {
// TestAccCivoInstance_basic is a test function that verifies the basic functionality of creating a Civo instance.
func TestAccCivoInstance_basic(t *testing.T) {
var instance civogo.Instance

// generate a random name for each test run
Expand Down Expand Up @@ -50,7 +50,8 @@ func CivoInstance_basic(t *testing.T) {
})
}

func CivoInstanceSize_update(t *testing.T) {
// TestAccCivoInstanceSize_update is a test function that verifies the update functionality of the CivoInstanceSize resource.
func TestAccCivoInstanceSize_update(t *testing.T) {
var instance civogo.Instance

// generate a random name for each test run
Expand Down Expand Up @@ -101,7 +102,7 @@ func CivoInstanceSize_update(t *testing.T) {
})
}

func CivoInstanceNotes_update(t *testing.T) {
func TestAccCivoInstanceNotes_update(t *testing.T) {
var instance civogo.Instance

// generate a random name for each test run
Expand Down Expand Up @@ -154,7 +155,7 @@ func CivoInstanceNotes_update(t *testing.T) {
})
}

func CivoInstanceFirewall_update(t *testing.T) {
func TestAccCivoInstanceFirewall_update(t *testing.T) {
var instance civogo.Instance

// generate a random name for each test run
Expand Down
2 changes: 1 addition & 1 deletion civo/ip/datasource_reserved_ip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func DataSourceReservedIP_basic(t *testing.T) {
func TestAccDataSourceReservedIP_basic(t *testing.T) {
datasourceName := "data.civo_reserved_ip.foobar"
name := acctest.RandomWithPrefix("ip-test")

Expand Down
4 changes: 2 additions & 2 deletions civo/ip/resource_reserved_ip_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/v2/terraform"
)

func CivoReservedIP_basic(t *testing.T) {
func TestAccCivoReservedIP_basic(t *testing.T) {
var ip civogo.IP

// generate a random name for each test run
Expand Down Expand Up @@ -40,7 +40,7 @@ func CivoReservedIP_basic(t *testing.T) {
})
}

func CivoReservedIP_update(t *testing.T) {
func TestAccCivoReservedIP_update(t *testing.T) {
var ip civogo.IP

// generate a random name for each test run
Expand Down
4 changes: 2 additions & 2 deletions civo/kubernetes/datasource_kubernetes_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func DataSourceCivoKubernetesCluster_basic(t *testing.T) {
func TestAccDataSourceCivoKubernetesCluster_basic(t *testing.T) {
datasourceName := "data.civo_kubernetes_cluster.foobar"
name := acctest.RandomWithPrefix("k8s")

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

func DataSourceCivoKubernetesClusterByID_basic(t *testing.T) {
func TestAccDataSourceCivoKubernetesClusterByID_basic(t *testing.T) {
datasourceName := "data.civo_kubernetes_cluster.foobar"
name := acctest.RandomWithPrefix("k8s")

Expand Down
4 changes: 2 additions & 2 deletions civo/kubernetes/datasource_kubernetes_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

func DataSourceCivoKubernetesVersion_basic(t *testing.T) {
func TestAccDataSourceCivoKubernetesVersion_basic(t *testing.T) {
datasourceName := "data.civo_kubernetes_version.foobar"

resource.Test(t, resource.TestCase{
Expand All @@ -27,7 +27,7 @@ func DataSourceCivoKubernetesVersion_basic(t *testing.T) {
})
}

func DataSourceCivoKubernetesVersion_WithFilter(t *testing.T) {
func TestAccDataSourceCivoKubernetesVersion_WithFilter(t *testing.T) {
datasourceName := "data.civo_kubernetes_version.foobar"

resource.Test(t, resource.TestCase{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// example.Widget represents a concrete Go type that represents an API resource
func CivoKubernetesClusterNodePool_basic(t *testing.T) {
func TestAccCivoKubernetesClusterNodePool_basic(t *testing.T) {
var kubernetes civogo.KubernetesCluster
var kubernetesNodePool civogo.KubernetesPool

Expand Down
5 changes: 2 additions & 3 deletions civo/kubernetes/resource_kubernetes_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

// example.Widget represents a concrete Go type that represents an API resource
func CivoKubernetesCluster_basic(t *testing.T) {
func TestAccCivoKubernetesCluster_basic(t *testing.T) {
var kubernetes civogo.KubernetesCluster

// generate a random name for each test run
Expand Down Expand Up @@ -51,7 +50,7 @@ func CivoKubernetesCluster_basic(t *testing.T) {
})
}

func CivoKubernetesClusterCNI(t *testing.T) {
func TestAccCivoKubernetesClusterCNI(t *testing.T) {
var kubernetes civogo.KubernetesCluster

// generate a random name for each test run
Expand Down
2 changes: 1 addition & 1 deletion civo/network/datasource_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func DataSourceCivoNetwork_basic(t *testing.T) {
func TestAccDataSourceCivoNetwork_basic(t *testing.T) {
datasourceName := "data.civo_network.foobar"
name := acctest.RandomWithPrefix("net-test")

Expand Down
4 changes: 2 additions & 2 deletions civo/network/resource_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// example.Widget represents a concrete Go type that represents an API resource
func CivoNetwork_basic(t *testing.T) {
func TestAccCivoNetwork_basic(t *testing.T) {
var network civogo.Network

// generate a random name for each test run
Expand Down Expand Up @@ -42,7 +42,7 @@ func CivoNetwork_basic(t *testing.T) {
})
}

func CivoNetwork_update(t *testing.T) {
func TestAccCivoNetwork_update(t *testing.T) {
var network civogo.Network

// generate a random name for each test run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func DataSourceCivoObjectStoreCredential_basic(t *testing.T) {
func TestAccDataSourceCivoObjectStoreCredential_basic(t *testing.T) {
datasourceName := "data.civo_object_store_credential.foobar"
name := acctest.RandomWithPrefix("objectstorecredential")

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

func DataSourceCivoObjectStore_basic(t *testing.T) {
func TestAccDataSourceCivoObjectStore_basic(t *testing.T) {
datasourceName := "data.civo_object_store.foobar"
name := acctest.RandomWithPrefix("objectstore")

Expand Down
Loading

0 comments on commit ecb4f55

Please sign in to comment.