@@ -29,13 +29,13 @@ func TestAccMachineProxyBasic(t *testing.T) {
2929 ProtoV6ProviderFactories : ProtoV6ProviderFactories (),
3030 Steps : []resource.TestStep {
3131 {
32- Config : testMachineProxyBasic (data ),
32+ Config : testMachineProxyBasic (data , localName ),
3333 Check : resource .ComposeTestCheckFunc (
3434 resource .TestCheckResourceAttr (prefix , "name" , data .Name ),
3535 ),
3636 },
3737 {
38- Config : testMachineProxyUpdate (data ),
38+ Config : testMachineProxyUpdate (data , localName ),
3939 Check : resource .ComposeTestCheckFunc (
4040 resource .TestCheckResourceAttr (prefix , "name" , data .Name + "-updated" ),
4141 ),
@@ -44,16 +44,17 @@ func TestAccMachineProxyBasic(t *testing.T) {
4444 })
4545}
4646
47- func testMachineProxyBasic (data * proxies.Proxy ) string {
47+ func testMachineProxyBasic (data * proxies.Proxy , localName string ) string {
4848 return fmt .Sprintf (`
49- resource "octopusdeploy_machine_proxy" "test_proxy " {
49+ resource "octopusdeploy_machine_proxy" "%s " {
5050 name = "%s"
5151 host = "%s"
5252 username = "%s"
5353 password = "%s"
5454 port = %d
5555 }
5656` ,
57+ localName ,
5758 data .Name ,
5859 data .Host ,
5960 data .Username ,
@@ -62,10 +63,10 @@ func testMachineProxyBasic(data *proxies.Proxy) string {
6263 )
6364}
6465
65- func testMachineProxyUpdate (data * proxies.Proxy ) string {
66+ func testMachineProxyUpdate (data * proxies.Proxy , localName string ) string {
6667 data .Name = data .Name + "-updated"
6768
68- return testMachineProxyBasic (data )
69+ return testMachineProxyBasic (data , localName )
6970}
7071
7172func testMachineProxyDestroy (s * terraform.State ) error {
0 commit comments