aboutsummaryrefslogtreecommitdiff
path: root/libvirt
diff options
context:
space:
mode:
authorDuncan Mac-Vicar P <dmacvicar@suse.de>2017-11-10 14:36:21 +0100
committerDuncan Mac-Vicar P <dmacvicar@suse.de>2017-11-10 14:49:11 +0100
commit59e2398e8480c0dc81e4ced182fea3234404d4ae (patch)
treea2d51580a4dddb423e1079aec2b93e6e8b602292 /libvirt
parentbac5f817ede55b8c86d615c63d6f226d9dd4b7b5 (diff)
downloadterraform-provider-libvirt-59e2398e8480c0dc81e4ced182fea3234404d4ae.tar
terraform-provider-libvirt-59e2398e8480c0dc81e4ced182fea3234404d4ae.tar.gz
make golint happy
Diffstat (limited to 'libvirt')
-rw-r--r--libvirt/resource_libvirt_domain_test.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/libvirt/resource_libvirt_domain_test.go b/libvirt/resource_libvirt_domain_test.go
index 1eaa482c..9b81951a 100644
--- a/libvirt/resource_libvirt_domain_test.go
+++ b/libvirt/resource_libvirt_domain_test.go
@@ -592,13 +592,13 @@ func testAccCheckLibvirtScsiDisk(n string, domain *libvirt.Domain) resource.Test
func createNvramFile() (string, error) {
// size of an accepted, valid, nvram backing store
- nvram_dummy_buffer := make([]byte, 131072)
+ NVRAMDummyBuffer := make([]byte, 131072)
file, err := ioutil.TempFile("/tmp", "nvram")
if err != nil {
return "", err
}
file.Chmod(0777)
- _, err = file.Write(nvram_dummy_buffer)
+ _, err = file.Write(NVRAMDummyBuffer)
if err != nil {
return "", err
}
@@ -608,8 +608,8 @@ func createNvramFile() (string, error) {
return file.Name(), nil
}
-func TestAccLibvirtDomain_Firmware(t *testing.T) {
- nvram_path, err := createNvramFile()
+func TestAccLibvirtDomainFirmware(t *testing.T) {
+ NVRAMPath, err := createNvramFile()
if err != nil {
t.Fatal(err)
}
@@ -631,14 +631,14 @@ func TestAccLibvirtDomain_Firmware(t *testing.T) {
}
t.Run("No Template", func(t *testing.T) {
- subtestAccLibvirtDomain_FirmwareNoTemplate(t, nvram_path, firmware)
+ subtestAccLibvirtDomainFirmwareNoTemplate(t, NVRAMPath, firmware)
})
t.Run("With Template", func(t *testing.T) {
- subtestAccLibvirtDomain_FirmwareTemplate(t, nvram_path, firmware, template)
+ subtestAccLibvirtDomainFirmwareTemplate(t, NVRAMPath, firmware, template)
})
}
-func subtestAccLibvirtDomain_FirmwareNoTemplate(t *testing.T, nvram_path string, firmware string) {
+func subtestAccLibvirtDomainFirmwareNoTemplate(t *testing.T, NVRAMPath string, firmware string) {
var domain libvirt.Domain
var config = fmt.Sprintf(`
resource "libvirt_domain" "acceptance-test-domain" {
@@ -647,7 +647,7 @@ func subtestAccLibvirtDomain_FirmwareNoTemplate(t *testing.T, nvram_path string,
nvram {
file = "%s"
}
- }`, firmware, nvram_path)
+ }`, firmware, NVRAMPath)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
@@ -661,7 +661,7 @@ func subtestAccLibvirtDomain_FirmwareNoTemplate(t *testing.T, nvram_path string,
resource.TestCheckResourceAttr(
"libvirt_domain.acceptance-test-domain", "name", "terraform-test-firmware-no-template"),
resource.TestCheckResourceAttr(
- "libvirt_domain.acceptance-test-domain", "nvram.file", nvram_path),
+ "libvirt_domain.acceptance-test-domain", "nvram.file", NVRAMPath),
resource.TestCheckResourceAttr(
"libvirt_domain.acceptance-test-domain", "firmware", firmware),
),
@@ -670,8 +670,8 @@ func subtestAccLibvirtDomain_FirmwareNoTemplate(t *testing.T, nvram_path string,
})
}
-func subtestAccLibvirtDomain_FirmwareTemplate(t *testing.T, nvram_path string, firmware string, template string) {
- nvram_path, err := createNvramFile()
+func subtestAccLibvirtDomainFirmwareTemplate(t *testing.T, NVRAMPath string, firmware string, template string) {
+ NVRAMPath, err := createNvramFile()
if err != nil {
t.Fatal(err)
}
@@ -685,7 +685,7 @@ func subtestAccLibvirtDomain_FirmwareTemplate(t *testing.T, nvram_path string, f
file = "%s"
template = "%s"
}
- }`, firmware, nvram_path, template)
+ }`, firmware, NVRAMPath, template)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
@@ -699,7 +699,7 @@ func subtestAccLibvirtDomain_FirmwareTemplate(t *testing.T, nvram_path string, f
resource.TestCheckResourceAttr(
"libvirt_domain.acceptance-test-domain", "name", "terraform-test-firmware-with-template"),
resource.TestCheckResourceAttr(
- "libvirt_domain.acceptance-test-domain", "nvram.file", nvram_path),
+ "libvirt_domain.acceptance-test-domain", "nvram.file", NVRAMPath),
resource.TestCheckResourceAttr(
"libvirt_domain.acceptance-test-domain", "nvram.template", template),
resource.TestCheckResourceAttr(