aboutsummaryrefslogtreecommitdiff
path: root/libpod/state_test.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-12-07 23:04:47 +0100
committerPaul Holzinger <pholzing@redhat.com>2021-12-14 15:23:39 +0100
commit9ce6b64133bc37433efac391bcaf9234c3890fc5 (patch)
tree92f8be84f1799230083d3490b52956ce2c01f4f1 /libpod/state_test.go
parent4e8ad039cee5debcc1afe93a455cd8a25e88d16b (diff)
downloadpodman-9ce6b64133bc37433efac391bcaf9234c3890fc5.tar.gz
podman-9ce6b64133bc37433efac391bcaf9234c3890fc5.tar.bz2
podman-9ce6b64133bc37433efac391bcaf9234c3890fc5.zip
network db: add new strucutre to container create
Make sure we create new containers in the db with the correct structure. Also remove some unneeded code for alias handling. We no longer need this functions. The specgen format has not been changed for now. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/state_test.go')
-rw-r--r--libpod/state_test.go18
1 files changed, 3 insertions, 15 deletions
diff --git a/libpod/state_test.go b/libpod/state_test.go
index 5c3b0d7f7..b0793127d 100644
--- a/libpod/state_test.go
+++ b/libpod/state_test.go
@@ -1299,21 +1299,9 @@ func TestAddContainerEmptyNetworkNameErrors(t *testing.T) {
testCtr, err := getTestCtr1(manager)
assert.NoError(t, err)
- testCtr.config.Networks = []string{""}
-
- err = state.AddContainer(testCtr)
- assert.Error(t, err)
- })
-}
-
-func TestAddContainerNetworkAliasesButNoMatchingNetwork(t *testing.T) {
- runForAllStates(t, func(t *testing.T, state State, manager lock.Manager) {
- testCtr, err := getTestCtr1(manager)
- assert.NoError(t, err)
-
- testCtr.config.Networks = []string{"test1"}
- testCtr.config.NetworkAliases = make(map[string][]string)
- testCtr.config.NetworkAliases["test2"] = []string{"alias1"}
+ testCtr.config.Networks = map[string]types.PerNetworkOptions{
+ "": {},
+ }
err = state.AddContainer(testCtr)
assert.Error(t, err)