aweiteka / UATFramework

A lightweight User Acceptance Testing framework
GNU General Public License v2.0
3 stars 12 forks source link

rhelah: update status methods to use JSON output #96

Closed miabbott closed 4 years ago

miabbott commented 8 years ago

Newer versions of rpm-ostree and atomic host status now support JSON output.

This change updates the methods which use the output from atomic host status to use the JSON output, rather than using a regexp on the string output from the command.

miabbott commented 8 years ago

@chuanchang @johnbieren Only did some light testing with this, so there may be errors

chuanchang commented 8 years ago

@miabbott, sorry for delaying review, could you rebase this one? thanks.

miabbott commented 8 years ago

@chuanchang I don't see any conflicts that need rebasing...

johnbieren commented 8 years ago

@miabbott Sorry, took me a while to setup my automated environment with a current enough release of atomic to use --json. In get_atomic_status, you have return json.loads(status_result). This fails for me because status_result is of type list and you can't json.loads a list. I believe you need something like return json.loads(status_result[0]["stdout"]), but I'm not positive.

miabbott commented 8 years ago

@johnbieren Yeah you are right. I totally mangled those methods by ignoring the fact that there might be more than one host the tests are running against.

I'll have to re-work this change.

miabbott commented 7 years ago

The back to back RHELAH releases have me swamped and I haven't had time to look at this again.

If someone wants to pick up this PR and re-work it correctly, that would be OK with me.