In the currently used go.podman.io/common/pkg/libartifact version
there is no store subpackage (yet). Fix the import statement and
usage accordingly.
Fixes: df0e3b6ec7 ("libpod: move artifact volume validation to creation phase"
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Apparently, prealloc got much smarter in this version, so let's disable
it for _test.go files as we're not really interested in
micro-optimizations for the test code.
The rest of its warnings is being fixed by the earlier commits.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
runWslCommand never returns err != nil because if there's an error, it
calls Fail (which panics, so the code after it is unreachable).
Remove error returning and checking.
Inspired by the following linter warning:
> pkg/machine/e2e/config_windows_test.go:59:56: runWslCommand - result 1 (error) is always nil (unparam)
> func runWslCommand(cmdArgs []string) (*machineSession, error) {
> ^
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Do not reuse names slice for the unrelated data. This fixes the
following prealoc warning:
> libpod/storage.go:109:2: Consider preallocating names with capacity 2 (prealloc)
> names := []string{containerName}
> ^
This commit is part of series fixing issues reported by prealloc linter
from golangci-lint v2.8.0.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Rather than append LocalhostSSHArgs to args, prepend it, assuming the
order doesn't matter here.
This fixes the following prealloc warning (without decreasing
readability):
> cmd/podman/machine/cp.go:130:2: Consider preallocating args (prealloc)
> args := []string{"-r", "-i", sshConfig.IdentityPath, "-P", strconv.Itoa(sshConfig.Port)}
> ^
This commit is part of series fixing issues reported by prealloc linter
from golangci-lint v2.8.0.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Instead of creating a slice and then appending to it, let's inline the
initial slice into append. This may or may not result in less slice
reallocations, but it is silencing the prealloc linter warnings.
This commit is part of series fixing issues reported by prealloc linter
from golangci-lint v2.8.0.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Copying the slice is not necessary here since registeredBinfmtMisc
always creates the slice from scratch.
This commit is part of series fixing issues reported by prealloc linter
from golangci-lint v2.8.0.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
When we already know the resulting slice size but still need/want to use
append, it makes sense to preallocate the slice by using make with the
capacity argument.
This commit is part of series fixing issues reported by prealloc linter
from golangci-lint v2.8.0.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Calling append can lead to resizing the slice. In case we have all
elements beforehand, it is not necessary to call append in the first
place and this avoid resizing.
This is the first part of fixing issues reported by prealloc linter from
golangci-lint v2.8.0.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Changes:
- Fix 'docs.source' typo to 'docs/source' on lines 54, 59, 60, 65.
- Correct filenames on lines 84, 91, 170, 193-196 to point to files that actually exist in the repo.
- Removed line 139 as the command no longer exists.
Why:
- The linked documentation filenames were renamed resulting in broken links.
Scope:
- transfer.md only - no code changes
Signed-off-by: Criszel Gipala <gipalacriszel512@gmail.com>
The main purpose of the transient services/timers is to trigger the
healthcheck execution in regular intervals, their own state should
not depend on the result of the healthchecks. This way there are no
failing systemd services unless there is actually a fatal error.
Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com>
This is useful for triggering the execution of a healthcheck
without caring about it's result as long as no fatal error occured.
Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com>
Use t.Helper, t.TempDir, and t.Cleanup in getEmptySqliteState,
simplifying its code and its users.
Simplify runForAllStates: remove redundant t.Fail call, and move
getEmptySqliteState call under t.Run.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
By default something like a 404 will not make curl exit with an error
code. This is problematic for obvious reasons and instead of the file
you want you may now have some 404 html text instead.
I noticed this in #28003 which well just build fine installers except
the binary downloaded by the installer Makefile simply did not exist.
So to address that add --fail to most curl commands.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>