From 9897dbb213e2794d8314e3df07549498c9ab9a44 Mon Sep 17 00:00:00 2001 From: Devashish Date: Wed, 17 Jul 2024 17:17:57 +0530 Subject: [PATCH] Fmt --- internal/hcp/registry/json.go | 2 +- internal/hcp/registry/metadata/os_test.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/hcp/registry/json.go b/internal/hcp/registry/json.go index cddeae91f..2bf62148c 100644 --- a/internal/hcp/registry/json.go +++ b/internal/hcp/registry/json.go @@ -97,7 +97,7 @@ func (h *JSONRegistry) CompleteBuild( buildErr error, ) ([]sdkpacker.Artifact, error) { buildName := build.Name() - buildMetadata, envMetadata := build.(*packer.CoreBuild).GetMetadata(), h.metadata + buildMetadata, envMetadata := build.(*packer.CoreBuild).GetMetadata(), h.metadata err := h.bucket.Version.AddMetadataToBuild(ctx, buildName, buildMetadata, envMetadata) if err != nil { return nil, err diff --git a/internal/hcp/registry/metadata/os_test.go b/internal/hcp/registry/metadata/os_test.go index 789449e8d..00aa382cb 100644 --- a/internal/hcp/registry/metadata/os_test.go +++ b/internal/hcp/registry/metadata/os_test.go @@ -21,13 +21,13 @@ func TestGetInfoForWindows(t *testing.T) { tests := []struct { name string stdout string - err error + err error expected OSInfo }{ { - name: "Valid version info", - stdout: "Microsoft Windows [Version 10.0.19042.928]", - err: nil, + name: "Valid version info", + stdout: "Microsoft Windows [Version 10.0.19042.928]", + err: nil, expected: OSInfo{ Name: runtime.GOOS, Arch: runtime.GOARCH, @@ -35,9 +35,9 @@ func TestGetInfoForWindows(t *testing.T) { }, }, { - name: "Invalid version info", - stdout: "Invalid output", - err: fmt.Errorf("Invalid output"), + name: "Invalid version info", + stdout: "Invalid output", + err: fmt.Errorf("Invalid output"), expected: OSInfo{ Name: runtime.GOOS, Arch: runtime.GOARCH, @@ -51,7 +51,7 @@ func TestGetInfoForWindows(t *testing.T) { mockExecutor := MockExecutor{ stdout: tt.stdout, - err: tt.err, + err: tt.err, } result := GetInfoForWindows(mockExecutor)