Project

General

Profile

Actions

Bug #37132

closed

Alphabetical sorting in test broken

Added by dosas please_edit_me 4 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Fixed in Releases:
Found in Releases:

Description

I have been running this test https://github.com/theforeman/foreman/blob/develop/test/integration/operatingsystem_js_test.rb#L9 on forklift and on a docker container with foreman 3.9.1

The tests adds an operating system and expects that it is added as first entry in the list/table since alphanumerical sort is expected.
This works fine when I run it on forklift. But for the docker case I
get a different sorting:
Huawei_VRP 5.17 0 Edit
NoHosts 1.1 0 Edit
OpenSuse 12.3 0 Edit
RHEL 6.1 0 Edit
Solaris 5.10 (hw0910) 0 Edit
Ubuntu 10.10 0 Edit
Ubuntu 12.10 0 Edit
aaa 50 0 Edit
centos 5.3 0 Edit

When I change aaa to AAA the test run on docker and the one on forklift both succeeds :D

But the sorting in forklift is weird (capital, lowercase, capital ):
AAA 1 0 Edit
centos 5.3 0 Edit
Huawei_VRP 5.17 0 Edit
NoHosts 1.1 0 Edit
OpenSuse 12.3 0 Edit
RHEL 6.1 0 Edit
Solaris 5.10 (hw0910) 0 Edit
Ubuntu 10.10 0 Edit
Ubuntu 12.10 0 Edit

Proposal for fix: Do not rely on sorting in test but find element by name.

Actions

Also available in: Atom PDF