Skip to content

Commit

Permalink
Merge pull request dmacvicar#471 from wking/redundant-slice-literal-t…
Browse files Browse the repository at this point in the history
…ypes

libvirt/*_test: Remove redundant slice-literal entry types
  • Loading branch information
MalloZup authored Nov 6, 2018
2 parents 07d7ab4 + 0d870a1 commit afd5c1a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions libvirt/resource_libvirt_domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,22 +456,22 @@ func TestAccLibvirtDomain_CheckDHCPEntries(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccCheckLibvirtDomainDestroy,
Steps: []resource.TestStep{
resource.TestStep{
{
Config: configWithDomain,
ExpectNonEmptyPlan: true,
Check: resource.ComposeTestCheckFunc(
testAccCheckLibvirtDomainExists("libvirt_domain."+randomDomainName, &domain),
testAccCheckLibvirtNetworkExists("libvirt_network."+randomNetworkName, &network),
),
},
resource.TestStep{
{
Config: configWithoutDomain,
Check: resource.ComposeTestCheckFunc(
testAccCheckLibvirtDestroyLeavesIPs("libvirt_network."+randomNetworkName,
"192.0.0.2", &network),
),
},
resource.TestStep{
{
Config: configWithDomain,
ExpectNonEmptyPlan: true,
Check: resource.ComposeTestCheckFunc(
Expand Down Expand Up @@ -1204,15 +1204,15 @@ func TestAccLibvirtDomain_Import(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccCheckLibvirtDomainDestroy,
Steps: []resource.TestStep{
resource.TestStep{
{
Config: fmt.Sprintf(`
resource "libvirt_domain" "%s" {
name = "%s"
memory = 384
vcpu = 2
}`, randomDomainName, randomDomainName),
},
resource.TestStep{
{
ResourceName: "libvirt_domain." + randomDomainName,
ImportState: true,
Check: resource.ComposeTestCheckFunc(
Expand Down
4 changes: 2 additions & 2 deletions libvirt/resource_libvirt_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func TestAccLibvirtNetwork_Import(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccCheckLibvirtNetworkDestroy,
Steps: []resource.TestStep{
resource.TestStep{
{
Config: fmt.Sprintf(`
resource "libvirt_network" "%s" {
name = "%s"
Expand All @@ -313,7 +313,7 @@ func TestAccLibvirtNetwork_Import(t *testing.T) {
addresses = ["10.17.3.0/24"]
}`, randomNetworkResource, randomNetworkName),
},
resource.TestStep{
{
ResourceName: resourceName,
ImportState: true,
Check: resource.ComposeTestCheckFunc(
Expand Down
4 changes: 2 additions & 2 deletions libvirt/resource_libvirt_volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,15 @@ func TestAccLibvirtVolume_Import(t *testing.T) {
Providers: testAccProviders,
CheckDestroy: testAccCheckLibvirtVolumeDestroy,
Steps: []resource.TestStep{
resource.TestStep{
{
Config: fmt.Sprintf(`
resource "libvirt_volume" "%s" {
name = "%s"
format = "raw"
size = 1073741824
}`, randomVolumeResource, randomVolumeName),
},
resource.TestStep{
{
ResourceName: "libvirt_volume." + randomVolumeResource,
ImportState: true,
Check: resource.ComposeTestCheckFunc(
Expand Down

0 comments on commit afd5c1a

Please sign in to comment.