summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-07-11 13:32:42 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-08-05 14:40:28 -0400
commitc528d7a622267fcee0f38f25c94198b23deed9dd (patch)
tree5b4f6a4fe723428ee317fbcd6c0588506fac8233 /cmd
parent58b1b99982cdaad5e0d5eccaf008aa343f8fefd2 (diff)
downloadpodman-c528d7a622267fcee0f38f25c94198b23deed9dd.tar.gz
podman-c528d7a622267fcee0f38f25c94198b23deed9dd.tar.bz2
podman-c528d7a622267fcee0f38f25c94198b23deed9dd.zip
Use file-based eventer for integration tests
This adds several top-level Podman flags for specifying different events backend types, which are then used in CI. It resolves a number of serious issues with events-based testing. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/cliconfig/config.go1
-rw-r--r--cmd/podman/libpodruntime/runtime.go4
-rw-r--r--cmd/podman/main_local.go1
3 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/cliconfig/config.go b/cmd/podman/cliconfig/config.go
index 4a4c839cc..cb809060a 100644
--- a/cmd/podman/cliconfig/config.go
+++ b/cmd/podman/cliconfig/config.go
@@ -16,6 +16,7 @@ type MainFlags struct {
CniConfigDir string
ConmonPath string
DefaultMountsFile string
+ EventsBackend string
HooksDir []string
MaxWorks int
Namespace string
diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go
index d83a71250..5685e2c4b 100644
--- a/cmd/podman/libpodruntime/runtime.go
+++ b/cmd/podman/libpodruntime/runtime.go
@@ -109,6 +109,10 @@ func getRuntime(ctx context.Context, c *cliconfig.PodmanCommand, renumber bool,
options = append(options, libpod.WithNetworkCmdPath(c.GlobalFlags.NetworkCmdPath))
}
+ if c.Flags().Changed("events-backend") {
+ options = append(options, libpod.WithEventsLogger(c.GlobalFlags.EventsBackend))
+ }
+
if c.Flags().Changed("cgroup-manager") {
options = append(options, libpod.WithCgroupManager(c.GlobalFlags.CGroupManager))
} else {
diff --git a/cmd/podman/main_local.go b/cmd/podman/main_local.go
index 132f35ab5..e1f661fbe 100644
--- a/cmd/podman/main_local.go
+++ b/cmd/podman/main_local.go
@@ -35,6 +35,7 @@ func init() {
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.CniConfigDir, "cni-config-dir", "", "Path of the configuration directory for CNI networks")
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.DefaultMountsFile, "default-mounts-file", "", "Path to default mounts file")
rootCmd.PersistentFlags().MarkHidden("defaults-mount-file")
+ rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.EventsBackend, "events-backend", "", "Events backend to use")
// Override default --help information of `--help` global flag
var dummyHelp bool
rootCmd.PersistentFlags().BoolVar(&dummyHelp, "help", false, "Help for podman")