Commit Graph

9 Commits

Author SHA1 Message Date
Valentin Rothberg 961863eab1 pkg/config: tests: do not load default config before each test
It's wasteful and `sut` was not a name I would now understand. Change
the tests that need a default config.  The diff also shows that the
tests would benefit a lot from a rewrite into a table-driven form but I
do not want to shave the entire Yak.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-14 09:40:27 +02:00
Valentin Rothberg e00d7e3560 pkg/config: unexport DefaultConfig
It has no external user and should not be exported to avoid any API
misuse; built-in defaults are an implementation detail.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-14 09:40:27 +02:00
Kir Kolyshkin b951b72412 Gofumpt the code
gofumpt is a stricter version of gofmt, basically making the code more
readable, and fixing the gocritic's octalLiterar warnings like this one:

	pkg/util/util_supported.go:26:17: octalLiteral: use new octal literal style, 0o722 (gocritic)
		return (perm & 0722) == 0700
			       ^

Generated by gofumpt -w .

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-04-09 16:50:11 -07:00
Sascha Grunert a6b63a5c47 Switch to ginkgo/v2
Update ginkgo to the next major version which has been released a while
ago.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-03-30 10:03:17 +02:00
dependabot-preview[bot] 461f6406d9 Bump github.com/onsi/gomega from 1.9.0 to 1.10.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.9.0...v1.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-08 07:39:54 -04:00
Daniel J Walsh 67213c41a3 Remove merge code and optional handling
Fix handling of toml files

No longer need merge, since we can specify a default conf for each toml file.
The toml code will retain the previous defaults and only use the newly specified
values.

This greatly simplifies the code.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-12-11 08:26:52 -05:00
Qi Wang 894913abdf add libpod.conf to containers.conf
Add configurations from libpod.conf to containers.conf.Use merge code from libpod to read and merge configurations from file.

Add unshare_linux for build linux: HomeDir should buildah not only for linux. so add unshare_linux for linux and unshare.go for other

convert bool to optinalbool:Use OptionalBool for on-disk configurations so we can distinguish field is undefined  vs. user set to false.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-12-06 15:55:47 -05:00
Qi Wang 023822b7b0 turn off the check of the hook directory
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-11-09 13:05:58 -05:00
Qi Wang 9bb8e7e62b Add config package for containers.conf
This PR adds a package config for reading configurations from the containers.conf into the go struct.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-10-07 13:38:17 -04:00