summaryrefslogtreecommitdiff
path: root/libpod/test_common.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-02-27 22:52:28 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-01 21:17:51 +0000
commitfa5f99effa7dd2ef9fbd5287b6225590b28713d1 (patch)
tree240a4696de8a499ed7489b67fcbdf4674ca87d19 /libpod/test_common.go
parent83d7ae6506f7aaf1f7d543412a148b4bf4cd6657 (diff)
downloadpodman-fa5f99effa7dd2ef9fbd5287b6225590b28713d1.tar.gz
podman-fa5f99effa7dd2ef9fbd5287b6225590b28713d1.tar.bz2
podman-fa5f99effa7dd2ef9fbd5287b6225590b28713d1.zip
Convert exec session tracking to use a dedicated struct
This will behave better if we need to add anything to it at a later date - we can add fields to the struct without breaking existing BoltDB databases. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #412 Approved by: baude
Diffstat (limited to 'libpod/test_common.go')
-rw-r--r--libpod/test_common.go25
1 files changed, 18 insertions, 7 deletions
diff --git a/libpod/test_common.go b/libpod/test_common.go
index 8b8248188..75d9516b1 100644
--- a/libpod/test_common.go
+++ b/libpod/test_common.go
@@ -49,13 +49,24 @@ func getTestContainer(id, name, locksDir string) (*Container, error) {
},
},
state: &containerState{
- State: ContainerStateRunning,
- ConfigPath: "/does/not/exist/specs/" + id,
- RunDir: "/does/not/exist/tmp/",
- Mounted: true,
- Mountpoint: "/does/not/exist/tmp/" + id,
- PID: 1234,
- ExecSessions: map[string]int{"abcd": 101, "ef01": 202},
+ State: ContainerStateRunning,
+ ConfigPath: "/does/not/exist/specs/" + id,
+ RunDir: "/does/not/exist/tmp/",
+ Mounted: true,
+ Mountpoint: "/does/not/exist/tmp/" + id,
+ PID: 1234,
+ ExecSessions: map[string]*ExecSession{
+ "abcd": {
+ ID: "1",
+ Command: []string{"2", "3"},
+ PID: 9876,
+ },
+ "ef01": {
+ ID: "5",
+ Command: []string{"hello", "world"},
+ PID: 46765,
+ },
+ },
},
valid: true,
}