Fix broken test due to sort order

What does this MR do?

!5469 (merged) introduced a test that raised an error with a list of supported options derived from a map, but the order of the map varies from platform to platform. This fix sorts the list in alphabetic order to ensure the results are consistent.

Why was this MR needed?

See the test failure in https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/9563406191.

What's the best way to test this MR?

go test -run "^Test_Image_ExecutorOptions_UnmarshalJSON$" gitlab.com/gitlab-org/gitlab-runner/common
Edited by Stan Hu

Merge request reports

Loading