kola: add PodmanWgetHead to fcos.internet
Get some basic coverage to confirm we can reach the outside world from
inside a container.
@@ -64,6 +64,7 @@ func init() {
Flags: []register.Flag{register.RequiresInternetAccess},
NativeFuncs: map[string]func() error{
"PodmanEcho": TestPodmanEcho,
+ "PodmanWgetHead": TestPodmanWgetHead,
},
Distros: []string{"fcos"},
})
@@ -173,6 +174,25 @@ func TestPodmanPing() error {
}
}
+func TestPodmanWgetHead() error {
+ //t.Parallel()
+ errc := make(chan error, 1)
+ go func() {
+ c := exec.Command("podman", "run", "busybox", "wget", "--spider", "http://fedoraproject.org/static/hotspot.txt")
+ err := c.Run()
+ errc <- err
+ }()
+ select {
+ case <-time.After(DockerTimeout):
+ return fmt.Errorf("PodmanWgetHead timed out after %s.", DockerTimeout)
+ case err := <-errc:
+ if err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
// This execs gdbus, because we need to change uses to test perms.
func TestDbusPerms() error {
c := exec.Command(
