Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
crhntr committed Dec 13, 2021
1 parent ef0e3ce commit 996a0b4
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 45 deletions.
10 changes: 5 additions & 5 deletions internal/commands/find_release_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ releases:
releaseName = "uaac"
fakeReleasesSource.FindReleaseVersionReturns(component.Lock{
Name: releaseName, Version: "74.12.5",
RemotePath: "remote_url",
RemoteSource: "bosh.io",
SHA1: "some-sha",
RemotePath: "remote_url",
RemoteSource: "bosh.io",
SHA1: "some-sha",
}, true, nil)
})

Expand All @@ -112,8 +112,8 @@ releases:
releaseName = "uaa"
fakeReleasesSource.FindReleaseVersionReturns(component.Lock{
Name: releaseName, Version: "74.16.5",
RemotePath: "remote_url",
RemoteSource: "sourceId",
RemotePath: "remote_url",
RemoteSource: "sourceId",
}, true, nil)
})

Expand Down
28 changes: 14 additions & 14 deletions internal/commands/update_release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ var _ = Describe("UpdateRelease", func() {
kilnfileLock = cargo.KilnfileLock{
Releases: []cargo.ComponentLock{
{
Name: "minecraft",
Version: "2.0.1",
Name: "minecraft",
Version: "2.0.1",

SHA1: "developersdevelopersdevelopersdevelopers",
RemoteSource: "bosh.io",
RemotePath: "not-used",
},
{
Name: releaseName,
Version: oldReleaseVersion,
Name: releaseName,
Version: oldReleaseVersion,

SHA1: oldReleaseSha1,
RemoteSource: oldReleaseSourceName,
Expand All @@ -100,13 +100,13 @@ var _ = Describe("UpdateRelease", func() {

downloadedReleasePath = filepath.Join(releasesDir, fmt.Sprintf("%s-%s.tgz", releaseName, newReleaseVersion))
expectedDownloadedRelease = component.Local{
Lock: component.Lock{Name: releaseName, Version: newReleaseVersion, SHA1: newReleaseSha1},
Lock: component.Lock{Name: releaseName, Version: newReleaseVersion, SHA1: newReleaseSha1},
LocalPath: downloadedReleasePath,
}
expectedRemoteRelease = expectedDownloadedRelease.Lock.WithRemote(newReleaseSourceName, newRemotePath)
exepectedNotDownloadedRelease := component.Lock{
Name: releaseName,
Version: notDownloadedReleaseVersion,
Name: releaseName,
Version: notDownloadedReleaseVersion,
RemotePath: notDownloadedRemotePath,
RemoteSource: notDownloadedReleaseSourceName,
SHA1: notDownloadedReleaseSha1,
Expand Down Expand Up @@ -163,8 +163,8 @@ var _ = Describe("UpdateRelease", func() {
Expect(updatedLockfile.Releases).To(HaveLen(2))
Expect(updatedLockfile.Releases).To(ContainElement(
cargo.ComponentLock{
Name: releaseName,
Version: newReleaseVersion,
Name: releaseName,
Version: newReleaseVersion,

SHA1: newReleaseSha1,
RemoteSource: newReleaseSourceName,
Expand Down Expand Up @@ -217,13 +217,13 @@ var _ = Describe("UpdateRelease", func() {

BeforeEach(func() {
expectedDownloadedRelease = component.Local{
Lock: component.Lock{Name: releaseName, Version: oldReleaseVersion, SHA1: oldReleaseSha1},
Lock: component.Lock{Name: releaseName, Version: oldReleaseVersion, SHA1: oldReleaseSha1},
LocalPath: "not-used",
}
expectedRemoteRelease = component.Lock{
Name: releaseName, Version: oldReleaseVersion,
RemotePath: oldRemotePath,
RemoteSource: oldReleaseSourceName,
RemotePath: oldRemotePath,
RemoteSource: oldReleaseSourceName,
}

releaseSource.GetMatchedReleaseReturns(expectedRemoteRelease, true, nil)
Expand Down Expand Up @@ -381,8 +381,8 @@ var _ = Describe("UpdateRelease", func() {
Expect(updatedLockfile.Releases).To(HaveLen(2))
Expect(updatedLockfile.Releases).To(ContainElement(
cargo.ComponentLock{
Name: releaseName,
Version: notDownloadedReleaseVersion,
Name: releaseName,
Version: notDownloadedReleaseVersion,
SHA1: notDownloadedReleaseSha1,
RemoteSource: notDownloadedReleaseSourceName,
RemotePath: notDownloadedRemotePath,
Expand Down
48 changes: 24 additions & 24 deletions internal/commands/update_stemcell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ var _ = Describe("UpdateStemcell", func() {
kilnfileLock = cargo.KilnfileLock{
Releases: []cargo.ComponentLock{
{
Name: release1Name,
Version: release1Version,
Name: release1Name,
Version: release1Version,
SHA1: "old-sha-1",
RemoteSource: "old-remote-source-1",
RemotePath: "old-remote-path-1",
},
{
Name: release2Name,
Version: release2Version,
Name: release2Name,
Version: release2Version,
SHA1: "old-sha-2",
RemoteSource: "old-remote-source-2",
RemotePath: "old-remote-path-2",
Expand All @@ -95,15 +95,15 @@ var _ = Describe("UpdateStemcell", func() {
case release1Name:
remote := component.Lock{
Name: release1Name, Version: release1Version,
RemotePath: newRelease1RemotePath,
RemoteSource: publishableReleaseSourceID,
RemotePath: newRelease1RemotePath,
RemoteSource: publishableReleaseSourceID,
}
return remote, true, nil
case release2Name:
remote := component.Lock{
Name: release2Name, Version: release2Version,
RemotePath: newRelease2RemotePath,
RemoteSource: unpublishableReleaseSourceID,
RemotePath: newRelease2RemotePath,
RemoteSource: unpublishableReleaseSourceID,
}
return remote, true, nil
default:
Expand All @@ -115,13 +115,13 @@ var _ = Describe("UpdateStemcell", func() {
switch remote.Name {
case release1Name:
local := component.Local{
Lock: component.Lock{Name: release1Name, Version: release1Version, SHA1: newRelease1SHA},
Lock: component.Lock{Name: release1Name, Version: release1Version, SHA1: newRelease1SHA},
LocalPath: "not-used",
}
return local, nil
case release2Name:
local := component.Local{
Lock: component.Lock{Name: release2Name, Version: release2Version, SHA1: newRelease2SHA},
Lock: component.Lock{Name: release2Name, Version: release2Version, SHA1: newRelease2SHA},
LocalPath: "not-used",
}
return local, nil
Expand Down Expand Up @@ -170,17 +170,17 @@ var _ = Describe("UpdateStemcell", func() {
Expect(updatedLockfile.Releases).To(HaveLen(2))
Expect(updatedLockfile.Releases).To(ContainElement(
cargo.ComponentLock{
Name: release1Name,
Version: release1Version,
Name: release1Name,
Version: release1Version,
SHA1: newRelease1SHA,
RemoteSource: publishableReleaseSourceID,
RemotePath: newRelease1RemotePath,
},
))
Expect(updatedLockfile.Releases).To(ContainElement(
cargo.ComponentLock{
Name: release2Name,
Version: release2Version,
Name: release2Name,
Version: release2Version,
SHA1: newRelease2SHA,
RemoteSource: unpublishableReleaseSourceID,
RemotePath: newRelease2RemotePath,
Expand Down Expand Up @@ -221,19 +221,19 @@ var _ = Describe("UpdateStemcell", func() {
Expect(actualDir).To(Equal(releasesDirPath))
Expect(remote1).To(Equal(
component.Lock{
Name: release1Name, Version: release1Version,
RemotePath: newRelease1RemotePath,
RemoteSource: publishableReleaseSourceID,
Name: release1Name, Version: release1Version,
RemotePath: newRelease1RemotePath,
RemoteSource: publishableReleaseSourceID,
},
))

actualDir, remote2 := releaseSource.DownloadReleaseArgsForCall(1)
Expect(actualDir).To(Equal(releasesDirPath))
Expect(remote2).To(Equal(
component.Lock{
Name: release2Name, Version: release2Version,
RemotePath: newRelease2RemotePath,
RemoteSource: unpublishableReleaseSourceID,
Name: release2Name, Version: release2Version,
RemotePath: newRelease2RemotePath,
RemoteSource: unpublishableReleaseSourceID,
},
))
})
Expand Down Expand Up @@ -342,17 +342,17 @@ var _ = Describe("UpdateStemcell", func() {
Expect(updatedLockfile.Releases).To(HaveLen(2))
Expect(updatedLockfile.Releases).To(ContainElement(
cargo.ComponentLock{
Name: release1Name,
Version: release1Version,
Name: release1Name,
Version: release1Version,
SHA1: newRelease1SHA,
RemoteSource: publishableReleaseSourceID,
RemotePath: newRelease1RemotePath,
},
))
Expect(updatedLockfile.Releases).To(ContainElement(
cargo.ComponentLock{
Name: release2Name,
Version: release2Version,
Name: release2Name,
Version: release2Version,
SHA1: newRelease2SHA,
RemoteSource: unpublishableReleaseSourceID,
RemotePath: newRelease2RemotePath,
Expand Down
4 changes: 2 additions & 2 deletions internal/commands/upload_release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ var _ = Describe("UploadRelease", func() {
BeforeEach(func() {
releaseUploader.GetMatchedReleaseReturns(component.Lock{
Name: "banana", Version: "1.2.3",
RemotePath: "banana/banana-1.2.3.tgz",
RemoteSource: "orange-bucket",
RemotePath: "banana/banana-1.2.3.tgz",
RemoteSource: "orange-bucket",
}, true, nil)
})

Expand Down

0 comments on commit 996a0b4

Please sign in to comment.