summaryrefslogtreecommitdiff
path: root/libpod/state_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-15 15:25:14 +0100
committerGitHub <noreply@github.com>2021-12-15 15:25:14 +0100
commit7dabcbd7bcf78f3b5d310ed547801106da382618 (patch)
tree7b92c3ca37025a833a0d9651afeb19ba7c903cc8 /libpod/state_test.go
parentb01a421f3413ba01b2c189b82c8153bdbd2a05fb (diff)
parentef325bc8c4824537e4bfb21aa7e6114a6e5a8c09 (diff)
downloadpodman-7dabcbd7bcf78f3b5d310ed547801106da382618.tar.gz
podman-7dabcbd7bcf78f3b5d310ed547801106da382618.tar.bz2
podman-7dabcbd7bcf78f3b5d310ed547801106da382618.zip
Merge pull request #12534 from Luap99/network-db
network db rewrite
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)