Commit fa598c6d authored by Daniel P. Berrange's avatar Daniel P. Berrange

Fix CPU stats integration test to not assume 1 host CPU

The LXC guest will report a number of CPUs equal to the number
of host CPUs. The integration test currently assumes that this
is just 1 CPU.
Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
parent 0c43e070
......@@ -968,7 +968,7 @@ func TestIntegrationGetDomainCPUStats(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if ncpus != 1 {
if ncpus < 1 {
t.Fatal("Number of CPUs should be 1, got", ncpus)
}
......@@ -990,8 +990,8 @@ func TestIntegrationGetDomainCPUStats(t *testing.T) {
t.Fatal(err)
}
if len(params) != lxcNumParams {
t.Fatalf("Wanted %d returned parameters, got %d", lxcNumParams, len(params))
if len(params) != (lxcNumParams * ncpus) {
t.Fatalf("Wanted %d returned parameters, got %d", lxcNumParams*ncpus, len(params))
}
param := params[0]
if param.Name != lxcParamName {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment