parent
81096b95ca
commit
f99d6b813d
2 changed files with 8 additions and 4 deletions
|
|
@ -28,10 +28,9 @@ export class Application extends React.Component {
|
||||||
super();
|
super();
|
||||||
this.state = { 'hostname': _("Unknown") };
|
this.state = { 'hostname': _("Unknown") };
|
||||||
|
|
||||||
cockpit.file('/etc/hostname').read()
|
cockpit.file('/etc/hostname').watch(content => {
|
||||||
.done((content) => {
|
this.setState({ 'hostname': content.trim() });
|
||||||
this.setState({ 'hostname': content.trim() });
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,11 @@ class TestApplication(testlib.MachineCase):
|
||||||
b.wait_present(".container-fluid p")
|
b.wait_present(".container-fluid p")
|
||||||
b.wait_text(".container-fluid p", "Running on " + hostname)
|
b.wait_text(".container-fluid p", "Running on " + hostname)
|
||||||
|
|
||||||
|
# change current hostname
|
||||||
|
m.execute("echo new-%s > /etc/hostname" % hostname)
|
||||||
|
# verify new hostname name
|
||||||
|
b.wait_text(".container-fluid p", "Running on new-" + hostname)
|
||||||
|
|
||||||
# change language to German
|
# change language to German
|
||||||
b.switch_to_top()
|
b.switch_to_top()
|
||||||
b.click("#content-user-name")
|
b.click("#content-user-name")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue