Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 64ed78b

Browse files
author
Mike Parker
committed
Review: Switch to using assert.Equal; Remove debug log line
Signed-off-by: Mike Parker <michael.parker@docker.com>
1 parent d286fb3 commit 64ed78b

2 files changed

Lines changed: 12 additions & 13 deletions

File tree

internal/packager/fork.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ func Fork(originName, forkName, outputDir string, maintainers []string) error {
4848
if err != nil {
4949
return errors.Wrapf(err, "failed to read metadata file from: %s", fullFilepath)
5050
}
51-
log.Debug("Loading app metadata")
5251
bytes, err = updateMetadata(bytes, namespace, name, maintainers)
5352
if err != nil {
5453
return err

types/types_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ func TestWithAttachmentsAndNestedDirectories(t *testing.T) {
163163
app, err := NewAppFromDefaultFiles(dir.Path())
164164
assert.NilError(t, err)
165165
assert.Assert(t, is.Len(app.Attachments(), 2))
166-
assert.Assert(t, is.Equal(app.Attachments()[0].Path(), "config.cfg"))
167-
assert.Assert(t, is.Equal(app.Attachments()[0].Size(), int64(9)))
168-
assert.Assert(t, is.Equal(app.Attachments()[1].Path(), "nesteddirectory/nestedconfig.cfg"))
166+
assert.Equal(t, app.Attachments()[0].Path(), "config.cfg")
167+
assert.Equal(t, app.Attachments()[0].Size(), int64(9))
168+
assert.Equal(t, app.Attachments()[1].Path(), "nesteddirectory/nestedconfig.cfg")
169169
}
170170

171171
func TestAttachmentsAreSorted(t *testing.T) {
@@ -186,12 +186,12 @@ func TestAttachmentsAreSorted(t *testing.T) {
186186
app, err := NewAppFromDefaultFiles(dir.Path())
187187
assert.NilError(t, err)
188188
assert.Assert(t, is.Len(app.Attachments(), 6))
189-
assert.Assert(t, is.Equal(app.Attachments()[0].Path(), "a.cfg"))
190-
assert.Assert(t, is.Equal(app.Attachments()[1].Path(), "b.cfg"))
191-
assert.Assert(t, is.Equal(app.Attachments()[2].Path(), "c.cfg"))
192-
assert.Assert(t, is.Equal(app.Attachments()[3].Path(), "nesteddirectory/a.cfg"))
193-
assert.Assert(t, is.Equal(app.Attachments()[4].Path(), "nesteddirectory/b.cfg"))
194-
assert.Assert(t, is.Equal(app.Attachments()[5].Path(), "nesteddirectory/c.cfg"))
189+
assert.Equal(t, app.Attachments()[0].Path(), "a.cfg")
190+
assert.Equal(t, app.Attachments()[1].Path(), "b.cfg")
191+
assert.Equal(t, app.Attachments()[2].Path(), "c.cfg")
192+
assert.Equal(t, app.Attachments()[3].Path(), "nesteddirectory/a.cfg")
193+
assert.Equal(t, app.Attachments()[4].Path(), "nesteddirectory/b.cfg")
194+
assert.Equal(t, app.Attachments()[5].Path(), "nesteddirectory/c.cfg")
195195
}
196196

197197
func TestWithAttachmentsIncludingNestedCoreFiles(t *testing.T) {
@@ -209,9 +209,9 @@ func TestWithAttachmentsIncludingNestedCoreFiles(t *testing.T) {
209209
app, err := NewAppFromDefaultFiles(dir.Path())
210210
assert.NilError(t, err)
211211
assert.Assert(t, is.Len(app.Attachments(), 3))
212-
assert.Assert(t, is.Equal(app.Attachments()[0].Path(), path.Join("nesteddirectory", internal.ComposeFileName)))
213-
assert.Assert(t, is.Equal(app.Attachments()[1].Path(), path.Join("nesteddirectory", internal.MetadataFileName)))
214-
assert.Assert(t, is.Equal(app.Attachments()[2].Path(), path.Join("nesteddirectory", internal.SettingsFileName)))
212+
assert.Equal(t, app.Attachments()[0].Path(), path.Join("nesteddirectory", internal.ComposeFileName))
213+
assert.Equal(t, app.Attachments()[1].Path(), path.Join("nesteddirectory", internal.MetadataFileName))
214+
assert.Equal(t, app.Attachments()[2].Path(), path.Join("nesteddirectory", internal.SettingsFileName))
215215
}
216216

217217
func TestValidateBrokenMetadata(t *testing.T) {

0 commit comments

Comments
 (0)