Amend commit author for license pass
This commit is contained in:
parent
3ab9bae79c
commit
833855eec5
|
@ -93,7 +93,7 @@ type DriverMock struct {
|
|||
AddToInstanceMetadataName string
|
||||
AddToInstanceMetadataKVPairs map[string]string
|
||||
AddToInstanceMetadataErrCh <-chan error
|
||||
AddToInstanceMetadataErr error
|
||||
AddToInstanceMetadataErr error
|
||||
}
|
||||
|
||||
func (d *DriverMock) CreateImage(name, description, family, zone, disk string, image_labels map[string]string, image_licenses []string, image_encryption_key *compute.CustomerEncryptionKey, imageStorageLocations []string) (<-chan *Image, <-chan error) {
|
||||
|
@ -296,8 +296,8 @@ func (d *DriverMock) DeleteOSLoginSSHKey(user, fingerprint string) error {
|
|||
}
|
||||
|
||||
func (d *DriverMock) AddToInstanceMetadata(zone string, name string, metadata map[string]string) (<-chan error, error) {
|
||||
d.AddToInstanceMetadataZone = zone
|
||||
d.AddToInstanceMetadataName = name
|
||||
d.AddToInstanceMetadataZone = zone
|
||||
d.AddToInstanceMetadataName = name
|
||||
d.AddToInstanceMetadataKVPairs = metadata
|
||||
|
||||
resultCh := d.AddToInstanceMetadataErrCh
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package googlecompute
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
const StartupScriptKey string = "startup-script"
|
||||
|
|
|
@ -5,9 +5,9 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"strings"
|
||||
"time"
|
||||
"log"
|
||||
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
||||
|
@ -232,7 +232,7 @@ func (s *StepCreateInstance) Run(ctx context.Context, state multistep.StateBag)
|
|||
}
|
||||
|
||||
log.Printf("[DEBUG] %s wait is over. Adding SSH keys to existing instance...",
|
||||
c.WaitToAddSSHKeys.String())
|
||||
c.WaitToAddSSHKeys.String())
|
||||
errCh, err = d.AddToInstanceMetadata(c.Zone, name, metadataSSHKeys)
|
||||
|
||||
if err != nil {
|
||||
|
@ -316,7 +316,7 @@ func (s *StepCreateInstance) Cleanup(state multistep.StateBag) {
|
|||
}
|
||||
|
||||
func addmap(a map[string]string, b map[string]string) {
|
||||
for k,v := range b {
|
||||
for k, v := range b {
|
||||
a[k] = v
|
||||
}
|
||||
}
|
|
@ -337,7 +337,7 @@ func TestCreateInstanceMetadata_metadataFile(t *testing.T) {
|
|||
c.MetadataFiles["user-data"] = fileName
|
||||
|
||||
// create our metadata
|
||||
metadataNoSSHKeys, _,err := c.createInstanceMetadata(image, "")
|
||||
metadataNoSSHKeys, _, err := c.createInstanceMetadata(image, "")
|
||||
|
||||
assert.True(t, err == nil, "Metadata creation should have succeeded.")
|
||||
|
||||
|
|
Loading…
Reference in New Issue