diff options
Diffstat (limited to 'test/e2e/network_test.go')
-rw-r--r-- | test/e2e/network_test.go | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go index 7933580a5..b010010f0 100644 --- a/test/e2e/network_test.go +++ b/test/e2e/network_test.go @@ -2,9 +2,7 @@ package integration import ( "fmt" - "io/ioutil" "os" - "path/filepath" "strings" "time" @@ -15,53 +13,6 @@ import ( . "github.com/onsi/gomega" ) -func writeConf(conf []byte, confPath string) { - if err := ioutil.WriteFile(confPath, conf, 777); err != nil { - fmt.Println(err) - } -} -func removeConf(confPath string) { - if err := os.Remove(confPath); err != nil { - fmt.Println(err) - } -} - -// generateNetworkConfig generates a cni config with a random name -// it returns the network name and the filepath -func generateNetworkConfig(p *PodmanTestIntegration) (string, string) { - // generate a random name to prevent conflicts with other tests - name := "net" + stringid.GenerateNonCryptoID() - path := filepath.Join(p.CNIConfigDir, fmt.Sprintf("%s.conflist", name)) - conf := fmt.Sprintf(`{ - "cniVersion": "0.3.0", - "name": "%s", - "plugins": [ - { - "type": "bridge", - "bridge": "cni1", - "isGateway": true, - "ipMasq": true, - "ipam": { - "type": "host-local", - "subnet": "10.99.0.0/16", - "routes": [ - { "dst": "0.0.0.0/0" } - ] - } - }, - { - "type": "portmap", - "capabilities": { - "portMappings": true - } - } - ] - }`, name) - writeConf([]byte(conf), path) - - return name, path -} - var _ = Describe("Podman network", func() { var ( tempdir string |