snapd
snapd copied to clipboard
cmd/snap/pack: make check-skeleton implicit
Always execute check-skeleton when executing snap pack. Make check-skeleton an implicit hidden option, to not break existing usage.
Fixes: LP #1950465
Unit tests are failing now:
----------------------------------------------------------------------
FAIL: cmd_pack_test.go:99: SnapSuite.TestPackPacksASnap
cmd_pack_test.go:117:
c.Assert(matches, check.HasLen, 1)
... obtained []string = []string(nil)
... n int = 1
----------------------------------------------------------------------
FAIL: cmd_pack_test.go:[120](https://github.com/snapcore/snapd/runs/6474084495?check_suite_focus=true#step:19:121): SnapSuite.TestPackPacksASnapWithCompressionHappy
cmd_pack_test.go:129:
c.Assert(matches, check.HasLen, 1)
... obtained []string = []string(nil)
... n int = 1
----------------------------------------------------------------------
FAIL: cmd_pack_test.go:[135](https://github.com/snapcore/snapd/runs/6474084495?check_suite_focus=true#step:19:136): SnapSuite.TestPackPacksASnapWithCompressionUnhappy
cmd_pack_test.go:140:
c.Assert(err, check.ErrorMatches, fmt.Sprintf(`cannot pack "/.*": cannot use compression %q`, comp))
... value = nil
... regex string = "cannot pack \"/.*\": cannot use compression \"gzip\""
... Error value is nil
OOPS: 582 passed, 9 skipped, 3 FAILED
--- FAIL: Test (16.98s)
FAIL