Amend commit author for license pass

This commit is contained in:
Gareth Rees 2020-12-02 11:16:16 +00:00
parent 3ab9bae79c
commit 833855eec5
6 changed files with 28 additions and 28 deletions

View File

@ -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

View File

@ -1,7 +1,7 @@
package googlecompute
import (
"fmt"
"fmt"
)
const StartupScriptKey string = "startup-script"

View File

@ -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
}
}

View File

@ -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.")