Skip to content

Commit

Permalink
lxd/resource_lxd_volume_test: s/container/instance/
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Nov 14, 2023
1 parent ae3a4fb commit 4514497
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lxd/resource_lxd_volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func TestAccVolume_basic(t *testing.T) {
})
}

func TestAccVolume_containerAttach(t *testing.T) {
func TestAccVolume_instanceAttach(t *testing.T) {
var volume api.StorageVolume
containerName := petname.Generate(2, "-")
instanceName := petname.Generate(2, "-")
poolName := petname.Generate(2, "-")
volumeName := petname.Generate(2, "-")
source := t.TempDir()
Expand All @@ -43,7 +43,7 @@ func TestAccVolume_containerAttach(t *testing.T) {
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccVolume_containerAttach(poolName, source, volumeName, containerName),
Config: testAccVolume_instanceAttach(poolName, source, volumeName, instanceName),
Check: resource.ComposeTestCheckFunc(
testAccVolumeExists(t, "lxd_volume.volume1", &volume),
resource.TestCheckResourceAttr("lxd_volume.volume1", "name", volumeName),
Expand Down Expand Up @@ -209,7 +209,7 @@ resource "lxd_volume" "volume1" {
`, poolName, source, volumeName)
}

func testAccVolume_containerAttach(poolName, source, volumeName, containerName string) string {
func testAccVolume_instanceAttach(poolName, source, volumeName, instanceName string) string {
return fmt.Sprintf(`
resource "lxd_storage_pool" "pool1" {
name = "%s"
Expand All @@ -224,7 +224,7 @@ resource "lxd_volume" "volume1" {
pool = "${lxd_storage_pool.pool1.name}"
}
resource "lxd_instance" "container1" {
resource "lxd_instance" "instance1" {
name = "%s"
image = "images:alpine/3.18/amd64"
profiles = ["default"]
Expand All @@ -239,7 +239,7 @@ resource "lxd_instance" "container1" {
}
}
}
`, poolName, source, volumeName, containerName)
`, poolName, source, volumeName, instanceName)
}

func testAccVolume_target(volumeName string) string {
Expand Down

0 comments on commit 4514497

Please sign in to comment.