Skip to content

Commit f81cc9d

Browse files
authored
Merge branch 'main' into feature/issue-assign-null
2 parents 64f40d6 + 52716d9 commit f81cc9d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

assets/internal/aql_impl_test.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package internal
33
import (
44
"context"
55
"errors"
6+
"net/http"
7+
"testing"
8+
69
model "github.com/ctreminiom/go-atlassian/v2/pkg/infra/models"
710
"github.com/ctreminiom/go-atlassian/v2/service"
811
"github.com/ctreminiom/go-atlassian/v2/service/mocks"
912
"github.com/stretchr/testify/assert"
10-
"net/http"
11-
"testing"
1213
)
1314

1415
func Test_internalAQLImpl_Filter(t *testing.T) {
@@ -18,7 +19,7 @@ func Test_internalAQLImpl_Filter(t *testing.T) {
1819
Page: 2,
1920
ResultPerPage: 25,
2021
IncludeAttributes: true,
21-
IncludeAttributesDeep: true,
22+
IncludeAttributesDeep: 12,
2223
IncludeTypeAttributes: true,
2324
IncludeExtendedInfo: true,
2425
}
@@ -55,7 +56,7 @@ func Test_internalAQLImpl_Filter(t *testing.T) {
5556
client.On("NewRequest",
5657
context.Background(),
5758
http.MethodGet,
58-
"jsm/assets/workspace/workspace-uuid-sample/v1/aql/objects?includeAttributes=true&includeAttributesDeep=true&includeExtendedInfo=true&includeTypeAttributes=true&page=2&qlQuery=Name+LIKE+Test&resultPerPage=25",
59+
"jsm/assets/workspace/workspace-uuid-sample/v1/aql/objects?includeAttributes=true&includeAttributesDeep=12&includeExtendedInfo=true&includeTypeAttributes=true&page=2&qlQuery=Name+LIKE+Test&resultPerPage=25",
5960
"",
6061
nil).
6162
Return(&http.Request{}, nil)
@@ -83,7 +84,7 @@ func Test_internalAQLImpl_Filter(t *testing.T) {
8384
client.On("NewRequest",
8485
context.Background(),
8586
http.MethodGet,
86-
"jsm/assets/workspace/workspace-uuid-sample/v1/aql/objects?includeAttributes=true&includeAttributesDeep=true&includeExtendedInfo=true&includeTypeAttributes=true&page=2&qlQuery=Name+LIKE+Test&resultPerPage=25",
87+
"jsm/assets/workspace/workspace-uuid-sample/v1/aql/objects?includeAttributes=true&includeAttributesDeep=12&includeExtendedInfo=true&includeTypeAttributes=true&page=2&qlQuery=Name+LIKE+Test&resultPerPage=25",
8788
"",
8889
nil).
8990
Return(&http.Request{}, errors.New("error, unable to create the http request"))

pkg/infra/models/assets_aql.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type AQLSearchParamsScheme struct {
1717
IncludeAttributes bool `query:"includeAttributes,omitempty"`
1818

1919
// IncludeAttributesDeep determines how many levels of attributes should be included.
20-
IncludeAttributesDeep bool `query:"includeAttributesDeep,omitempty"`
20+
IncludeAttributesDeep int `query:"includeAttributesDeep,omitempty"`
2121

2222
// IncludeTypeAttributes determines if the response should include the object type attribute definition for each attribute returned with the objects.
2323
IncludeTypeAttributes bool `query:"includeTypeAttributes,omitempty"`

0 commit comments

Comments
 (0)