Skip to content

Commit

Permalink
[github] Make command run tests stable
Browse files Browse the repository at this point in the history
  • Loading branch information
csweichel committed Mar 7, 2022
1 parent 4a0d3cc commit 057cfae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
"trigger": "TRIGGER_MANUAL",
"annotations": [
{
"key": "updateGitHubStatus",
"value": "csweichel/test-repo"
"key": "arg1"
},
{
"key": "foo",
"value": "bar"
},
{
"key": "arg1"
"key": "updateGitHubStatus",
"value": "csweichel/test-repo"
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions plugins/github-integration/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
"testing"

Expand Down Expand Up @@ -91,6 +92,9 @@ func TestHandleCommandRun(t *testing.T) {
client.EXPECT().StartJob2(gomock.Any(), gomock.Any(), gomock.Any()).
MinTimes(1).
DoAndReturn(func(ctx context.Context, creq *v1.StartJobRequest2) (*v1.StartJobResponse, error) {
sort.Slice(creq.Metadata.Annotations, func(i, j int) bool {
return creq.Metadata.Annotations[i].Key < creq.Metadata.Annotations[j].Key
})
act.StartRequest = creq
return &v1.StartJobResponse{
Status: &v1.JobStatus{
Expand Down

0 comments on commit 057cfae

Please sign in to comment.