Commit Graph

13 Commits

Author SHA1 Message Date
Braunson b2047bd938
Put the correct AzureTags type in StateBag (#10014)
Azure expects the tags format to use a pointer to the string for the map value.
The configuration from the builder is not a pointer so when storing in the state bag for
reference in later execution we convert it when creating the StateBag.

Fixes #10012 and #10013.

* Use the MapToAzureTags helper and error check in resource group creation

* Added test case for tag values not using a pointer

* test/azure/arm: Add test to verify tags stored in state

* test/azure/arm: Add azure_tags to existing acceptance test for Linux

Test Before Fix
```
--- FAIL: TestBuilderAcc_ManagedDisk_Linux (1.81s)
panic: interface conversion: interface {} is map[string]string, not map[string]*string [recovered]
        panic: interface conversion: interface {} is map[string]string, not map[string]*string
FAIL    github.com/hashicorp/packer/builder/azure/arm   1.822s

```

Test After Fix
```
2020/09/29 17:23:03 ui: ==> test: Resource group has been deleted.
--- PASS: TestBuilderAcc_ManagedDisk_Linux (517.41s)
    PASS
    ok      github.com/hashicorp/packer/builder/azure/arm   517.426s
```

Co-authored-by: Wilken Rivera <dev@wilkenrivera.com>
2020-09-30 09:55:46 -04:00
Christian Muehlhaeuser 216afbaa8b
Fixed various typos
Just a bunch of nit-picky typo fixes.
2019-07-25 06:49:51 +02:00
Adrien Delorme a4bf94dd3c change Builder to be passed a context for cancellation
we have to to give it to our hook
2019-04-03 15:55:55 +02:00
Hariharan Jayaraman b23d6c9589 fixing infinite loop issue deleting existing resources if we have a empty target resource 2018-06-06 15:25:19 -07:00
Hariharan Jayaraman da67df6d03 space fix 2018-05-18 21:17:19 -07:00
Hariharan Jayaraman ea9b2a8b5f review feedback 2018-05-18 12:09:42 -07:00
Hariharan Jayaraman 667113338a missed formating 2018-05-18 01:41:00 -07:00
Hariharan Jayaraman 7f2277676a Ensure that Device Login tests dont block general acceptance tests 2018-05-18 01:34:12 -07:00
Hariharan Jayaraman 77fe1bffe4 Ensure that Device Login tests dont block general acceptance tests 2018-05-18 01:25:19 -07:00
Hariharan Jayaraman 1f46271a6b Ensuring device login works for Windows build 2018-05-18 00:32:01 -07:00
Paul Meyer 169f9d22e6 Update 'the other place' too 2018-05-04 00:32:15 +00:00
Paul Meyer 80f57308d7 Process review feedback 2018-05-04 00:28:34 +00:00
Paul Meyer c13965c0ce Add acceptance tests 2018-05-01 15:39:50 +00:00