diff --git a/mantle/kola/tests/coretest/core.go b/mantle/kola/tests/coretest/core.go index d02ea0bab4c4b547c07048a381a41e334447e274..b2cc10da28f16a20cb956012d0bcf1566148c8ed 100644 --- a/mantle/kola/tests/coretest/core.go +++ b/mantle/kola/tests/coretest/core.go @@ -102,34 +102,34 @@ func TestPortSsh() error { func TestDockerEcho() error { //t.Parallel() util.RunCmdTimeout(DockerTimeout, "sudo", "systemctl", "start", "docker") - return util.RunCmdTimeout(DockerTimeout, "sudo", "docker", "run", "docker.io/busybox", "echo") + return util.RunCmdTimeout(DockerTimeout, "sudo", "docker", "run", "atomhub.openatom.cn/library/busybox:latest", "echo") } func TestDockerPing() error { //t.Parallel() util.RunCmdTimeout(DockerTimeout, "sudo", "systemctl", "start", "docker") - return util.RunCmdTimeout(DockerTimeout, "sudo", "docker", "run", "docker.io/busybox", "ping", "-c4", "baidu.com") + return util.RunCmdTimeout(DockerTimeout, "sudo", "docker", "run", "atomhub.openatom.cn/library/busybox:latest", "ping", "-c4", "baidu.com") } func TestDockerWgetHead() error { //t.Parallel() util.RunCmdTimeout(DockerTimeout, "sudo", "systemctl", "start", "docker") - return util.RunCmdTimeout(DockerTimeout, "sudo", "docker", "run", "docker.io/busybox", "wget", "--spider", "https://nestos.org.cn/kola/hotspot.txt") + return util.RunCmdTimeout(DockerTimeout, "sudo", "docker", "run", "atomhub.openatom.cn/library/busybox:latest", "wget", "--spider", "https://nestos.org.cn/kola/hotspot.txt") } func TestPodmanEcho() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "podman", "run", "docker.io/busybox", "echo") + return util.RunCmdTimeout(DockerTimeout, "podman", "run", "atomhub.openatom.cn/library/busybox:latest", "echo") } func TestPodmanPing() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "podman", "run", "docker.io/busybox", "ping", "-c4", "baidu.com") + return util.RunCmdTimeout(DockerTimeout, "podman", "run", "atomhub.openatom.cn/library/busybox:latest", "ping", "-c4", "baidu.com") } func TestPodmanWgetHead() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "podman", "run", "docker.io/busybox", "wget", "--spider", "https://nestos.org.cn/kola/hotspot.txt") + return util.RunCmdTimeout(DockerTimeout, "podman", "run", "atomhub.openatom.cn/library/busybox:latest", "wget", "--spider", "https://nestos.org.cn/kola/hotspot.txt") } // This execs gdbus, because we need to change uses to test perms. diff --git a/mantle/kola/tests/isula/isula.go b/mantle/kola/tests/isula/isula.go index 201a8cc0aa27c9601da53a572c1454c303fbbb9e..92a25b89d7e9bcd8171a5c6cb1bc54b6393753cb 100644 --- a/mantle/kola/tests/isula/isula.go +++ b/mantle/kola/tests/isula/isula.go @@ -127,7 +127,7 @@ func isulaWorkflow(c cluster.TestCluster) { // Test: Run container c.Run("run", func(c cluster.TestCluster) { - _, err := c.SSH(m, "sudo isula run -itd --name busybox docker.io/busybox") + _, err := c.SSH(m, "sudo isula run -itd --name busybox atomhub.openatom.cn/library/busybox:latest") if err != nil { c.Fatal(err) } @@ -191,7 +191,7 @@ func isulaWorkflow(c cluster.TestCluster) { // Test: Delete image c.Run("delete", func(c cluster.TestCluster) { - _, err := c.SSH(m, "sudo isula rmi docker.io/busybox") + _, err := c.SSH(m, "sudo isula rmi atomhub.openatom.cn/library/busybox:latest") if err != nil { c.Fatal(err) } diff --git a/mantle/kola/tests/ostree/basic.go b/mantle/kola/tests/ostree/basic.go index ce9682b3e96bfc8facf09d0a579aa6ac401b44c8..53a02e0df338b762ef6bc0f593aefd48edb341a2 100644 --- a/mantle/kola/tests/ostree/basic.go +++ b/mantle/kola/tests/ostree/basic.go @@ -57,7 +57,7 @@ type ostreeAdminStatus struct { // getOstreeRemotes returns the current number of ostree remotes on a machine func getOstreeRemotes(c cluster.TestCluster, m platform.Machine) (int, []string) { - remoteListOut := string(c.MustSSH(m, "ostree remote list")) + remoteListOut := string(c.MustSSH(m, "sudo ostree remote list")) numRemotes := 0 // If we get anything other than an empty string calculate the results // NOTE: This is needed as splitting "" ends up providing a count of 1 @@ -74,7 +74,7 @@ func getOstreeRemotes(c cluster.TestCluster, m platform.Machine) (int, []string) func getOstreeAdminStatus(c cluster.TestCluster, m platform.Machine) (ostreeAdminStatus, error) { oaStatus := ostreeAdminStatus{} - oasOutput, err := c.SSH(m, "ostree admin status") + oasOutput, err := c.SSH(m, "sudo ostree admin status") if err != nil { return oaStatus, fmt.Errorf(`Could not get "ostree admin status": %v`, err) } @@ -149,12 +149,12 @@ func ostreeBasicTest(c cluster.TestCluster) { // the checksum now c.RunLogged("rev-parse", func(c cluster.TestCluster) { // check the output of `ostree rev-parse` - c.AssertCmdOutputContains(m, ("ostree rev-parse " + oas.Origin), oas.Checksum) + c.AssertCmdOutputContains(m, ("sudo ostree rev-parse " + oas.Origin), oas.Checksum) }) // verify the output of 'ostree show' c.RunLogged("show", func(c cluster.TestCluster) { - oShowOut := c.MustSSH(m, ("ostree show " + oas.Checksum)) + oShowOut := c.MustSSH(m, ("sudo ostree show " + oas.Checksum)) oShowOutSplit := strings.Split(string(oShowOut), "\n") // we need at least the first 4 lines (commit, ContentChecksum, Date, Version) // to proceed safely @@ -205,7 +205,7 @@ func ostreeRemoteTest(c cluster.TestCluster) { // verify `ostree remote list` c.Run("list", func(c cluster.TestCluster) { - osRemoteListOut := c.MustSSH(m, "ostree remote list -u") + osRemoteListOut := c.MustSSH(m, "sudo ostree remote list -u") osRemoteListSplit := strings.Split(string(osRemoteListOut), "\n") // should have original remote + newly added remote @@ -230,12 +230,12 @@ func ostreeRemoteTest(c cluster.TestCluster) { // verify `ostree remote show-url` c.Run("show-url", func(c cluster.TestCluster) { - c.AssertCmdOutputContains(m, ("ostree remote show-url " + remoteName), remoteUrl) + c.AssertCmdOutputContains(m, ("sudo ostree remote show-url " + remoteName), remoteUrl) }) // verify `ostree remote refs` c.Run("refs", func(c cluster.TestCluster) { - osRemoteRefsOut := c.MustSSH(m, ("ostree remote refs " + remoteName)) + osRemoteRefsOut := c.MustSSH(m, ("sudo ostree remote refs " + remoteName)) if len(strings.Split(string(osRemoteRefsOut), "\n")) < 1 { c.Fatalf(`Did not receive expected amount of refs from remote: %v`, string(osRemoteRefsOut)) } @@ -243,14 +243,14 @@ func ostreeRemoteTest(c cluster.TestCluster) { // verify `ostree remote summary` c.Run("summary", func(c cluster.TestCluster) { - remoteRefsOut := c.MustSSH(m, ("ostree remote refs " + remoteName)) + remoteRefsOut := c.MustSSH(m, ("sudo ostree remote refs " + remoteName)) remoteRefsOutSplit := strings.Split(string(remoteRefsOut), "\n") remoteRefsCount := len(remoteRefsOutSplit) if remoteRefsCount < 1 { c.Fatalf(`Did not find any refs on ostree remote: %q`, string(remoteRefsOut)) } - osRemoteSummaryOut := c.MustSSH(m, ("ostree remote summary " + remoteName)) + osRemoteSummaryOut := c.MustSSH(m, ("sudo ostree remote summary " + remoteName)) if len(strings.Split(string(osRemoteSummaryOut), "\n")) < 1 { c.Fatalf(`Did not receive expected summary content from remote: %v`, string(osRemoteSummaryOut)) } @@ -286,7 +286,7 @@ func ostreeRemoteTest(c cluster.TestCluster) { // verify `ostree remote delete` c.Run("delete", func(c cluster.TestCluster) { - preRemotesOut := c.MustSSH(m, "ostree remote list") + preRemotesOut := c.MustSSH(m, "sudo ostree remote list") preNumRemotes := len(strings.Split(string(preRemotesOut), "\n")) if preNumRemotes < 1 { diff --git a/mantle/kola/tests/ostree/unlock.go b/mantle/kola/tests/ostree/unlock.go index 126239fb363f0c73ea8cc64e0edfbc9c7949c266..5d9fe8bfdcf7be1282e8bd14ce76bf26bd441142 100644 --- a/mantle/kola/tests/ostree/unlock.go +++ b/mantle/kola/tests/ostree/unlock.go @@ -32,6 +32,8 @@ func init() { Flags: []register.Flag{register.RequiresInternetAccess}, // need network to pull RPM FailFast: true, Tags: []string{"ostree"}, + // remove this testcase for iso,becase ro mount 'error: Remounting /sysroot read-write: Permission denied' + ExcludePlatforms: []string{"qemu-iso"}, }) register.RegisterTest(®ister.Test{ Run: ostreeHotfixTest, @@ -40,6 +42,8 @@ func init() { Name: "ostree.hotfix", FailFast: true, Tags: []string{"ostree"}, + // remove this testcase for iso,becase ro mount 'error: Remounting /sysroot read-write: Permission denied' + ExcludePlatforms: []string{"qemu-iso"}, // enable debugging for https://github.com/coreos/fedora-coreos-tracker/issues/942 // we can drop it once we resolved it UserData: conf.Butane(` diff --git a/mantle/kola/tests/podman/podman.go b/mantle/kola/tests/podman/podman.go index da34b1808e79ffa78f10b8aaa07ac9160954822b..1e0449eea10b52b699c89851921b3084140ce0ef 100644 --- a/mantle/kola/tests/podman/podman.go +++ b/mantle/kola/tests/podman/podman.go @@ -129,7 +129,7 @@ func podmanWorkflow(c cluster.TestCluster) { m := c.Machines()[0] // Test: Verify container can run with volume mount and port forwarding - image := "docker.nju.edu.cn/library/nginx" + image := "atomhub.openatom.cn/library/nginx" container_name := "nginx" wwwRoot := "/usr/share/nginx/html" var id string diff --git a/mantle/kola/tests/rpmostree/deployments.go b/mantle/kola/tests/rpmostree/deployments.go index dce8d96e02535df5f68f0ee4fe200145e854ce7a..a0ad130b874dbd550a7b2353594b3bf81ce53663 100644 --- a/mantle/kola/tests/rpmostree/deployments.go +++ b/mantle/kola/tests/rpmostree/deployments.go @@ -32,6 +32,8 @@ func init() { Name: "rpmostree.upgrade-rollback", FailFast: true, Tags: []string{"rpm-ostree", "upgrade"}, + // remove this testcase for iso,becase ro mount 'error: Remounting /sysroot read-write: Permission denied' + ExcludePlatforms: []string{"qemu-iso"}, }) register.RegisterTest(®ister.Test{ Run: rpmOstreeInstallUninstall, @@ -201,7 +203,7 @@ func rpmOstreeInstallUninstall(c cluster.TestCluster) { m := c.Machines()[0] - _, err := c.SSH(m, `sudo bash -c 'cd ${HOME} && curl -O http://www.nestos.org.cn/kola/aht-dummy-1.0-1.noarch.rpm'`) + _, err := c.SSH(m, `bash -c 'cd ${HOME} && curl -L -O https://www.nestos.org.cn/kola/aht-dummy-1.0-1.noarch.rpm'`) if err != nil { c.Fatal(err) } diff --git a/mantle/kola/tests/rpmostree/rebase.go b/mantle/kola/tests/rpmostree/rebase.go index 3d9eaaf24826b6058131e25dee0b67a640c25a5f..66cae349b540d1fa41296f8adc470ede9ef59005 100644 --- a/mantle/kola/tests/rpmostree/rebase.go +++ b/mantle/kola/tests/rpmostree/rebase.go @@ -14,6 +14,8 @@ func init() { FailFast: true, Tags: []string{"rpm-ostree", "upgrade"}, Flags: []register.Flag{register.RequiresInternetAccess}, + // remove this testcase for iso,becase ro mount 'error: Remounting /sysroot read-write: Permission denied' + ExcludePlatforms: []string{"qemu-iso"}, }) } diff --git a/mantle/util/distros.go b/mantle/util/distros.go index 8ddf800fa7d68a3b7af90150bfa2b540b7b26963..6e3744f18ee785bb5f4d884355e0219653063462 100644 --- a/mantle/util/distros.go +++ b/mantle/util/distros.go @@ -32,8 +32,8 @@ func TargetDistroFromName(artifact string) string { if strings.HasPrefix(basename, "nestos-") { return "nestos" } - // For now, just assume fcos - return "fcos" + // For now, just assume nestos + return "nestos" } // TargetDistro returns the distribution of a cosa build @@ -45,7 +45,7 @@ func TargetDistro(build *builds.Build) (string, error) { return "rhcos", nil case "fedora-coreos": return "fcos", nil - case "nestos": + case "nestos", "NestOS-For-Container": return "nestos", nil default: return "", fmt.Errorf("Unknown distribution: %s", build.Name)