-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[QE]test case update for linux default network change to user
- Loading branch information
Showing
4 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,9 +213,8 @@ func InitializeScenario(s *godog.ScenarioContext) { | |
} | ||
|
||
if tag.Name == "@proxy" { | ||
|
||
// start container with squid proxy | ||
err := util.ExecuteCommand("podman run --name squid -d -p 3128:3128 quay.io/crcont/squid") | ||
err := util.ExecuteCommand("sudo dnf install podman -y;podman run --name squid -d -p 3128:3128 quay.io/crcont/squid") | ||
if err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
|
@@ -240,6 +239,14 @@ func InitializeScenario(s *godog.ScenarioContext) { | |
} | ||
|
||
} | ||
|
||
if tag.Name == "@system_network" { | ||
err = util.ExecuteCommand("crc config set network-mode system") | ||
if err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
} | ||
} | ||
|
||
return ctx, nil | ||
|
@@ -358,6 +365,14 @@ func InitializeScenario(s *godog.ScenarioContext) { | |
} | ||
} | ||
|
||
if tag.Name == "@system_network" { | ||
err := util.ExecuteCommand("crc config unset network-mode") | ||
if err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
} | ||
|
||
} | ||
|
||
return ctx, nil | ||
|
@@ -961,9 +976,6 @@ func PodmanCommandIsAvailable() error { | |
csshk = filepath.Join(userHomeDir, ".crc/machines/crc/id_ed25519") | ||
dh = "npipe:////./pipe/crc-podman" | ||
} | ||
if runtime.GOOS == "linux" { | ||
ch = "ssh://[email protected]:22/run/user/1000/podman/podman.sock" | ||
} | ||
|
||
os.Setenv("PATH", path) | ||
os.Setenv("CONTAINER_SSHKEY", csshk) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,9 +57,6 @@ var _ = Describe("podman-remote", Serial, Ordered, Label("microshift-preset"), f | |
csshk = filepath.Join(userHomeDir, ".crc/machines/crc/id_ed25519") | ||
dh = "npipe:////./pipe/crc-podman" | ||
} | ||
if runtime.GOOS == "linux" { | ||
ch = "ssh://[email protected]:22/run/user/1000/podman/podman.sock" | ||
} | ||
|
||
os.Setenv("PATH", path) | ||
os.Setenv("CONTAINER_SSHKEY", csshk) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters