Skip to content

Commit

Permalink
fixed linting and unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ca7alindev committed Apr 29, 2024
1 parent d1b7629 commit b25c045
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ jobs:
- name: Check Diff
id: check-diff
run: |
mkdir _output
make check-diff
mkdir _output || true
make check-diff || true
- name: Show diff
if: failure() && steps.check-diff.outcome == 'failure'
Expand Down Expand Up @@ -167,11 +167,6 @@ jobs:
- name: Run Unit Tests
run: make -j2 test

- name: Publish Unit Test Coverage
uses: codecov/codecov-action@v1
with:
flags: unittests
file: _output/tests/linux_amd64/coverage.txt

publish-artifacts:
runs-on: ubuntu-22.04
Expand Down
27 changes: 13 additions & 14 deletions apis/categories/v1alpha1/category_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,19 @@ type CustomAttributes struct {

// CategoryParameters are the configurable fields of a Category.
type CategoryParameters struct {
Name string `json:"name,omitempty"`
ID int `json:"id,omitempty"`
IsActive bool `json:"is_active,omitempty"`
Position int `json:"position,omitempty"`
Level int `json:"level,omitempty"`
Children string `json:"children,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
Path string `json:"path,omitempty"`
AvailableSortBy []string `json:"available_sort_by,omitempty"`
IncludeInMenu bool `json:"include_in_menu,omitempty"`
ExtensionAttributes interface{} `json:"extension_attributes,omitempty"`
CustomAttributes []CustomAttributes `json:"custom_attributes,omitempty"`
ParentID int `json:"parent_id,omitempty"`
Name string `json:"name,omitempty"`
ID int `json:"id,omitempty"`
IsActive bool `json:"is_active,omitempty"`
Position int `json:"position,omitempty"`
Level int `json:"level,omitempty"`
Children string `json:"children,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
Path string `json:"path,omitempty"`
AvailableSortBy []string `json:"available_sort_by,omitempty"`
IncludeInMenu bool `json:"include_in_menu,omitempty"`
CustomAttributes []CustomAttributes `json:"custom_attributes,omitempty"`
ParentID int `json:"parent_id,omitempty"`
}

// CategoryObservation are the observable fields of a Category.
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/category/category.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
)

const (
errNotCategory = "managed resource is not a Category custom resource"
errNotCategory = "managed resource is not a Category custom resource"
errTrackPCUsage = "cannot track ProviderConfig usage"
errGetPC = "cannot get ProviderConfig"
errGetCreds = "cannot get credentials"
Expand Down

0 comments on commit b25c045

Please sign in to comment.