Skip to content

Commit

Permalink
test: complete appconfiguartion model unit tests (#484)
Browse files Browse the repository at this point in the history
#### What type of PR is this?
/kind test

#### What this PR does / why we need it:
* Complete appconfiguartion model unit tests
* Fix wrong acceptor type of MarshalJSON and MarshalYAML
  • Loading branch information
elliotxx committed Aug 22, 2023
1 parent c049c71 commit 0136769
Show file tree
Hide file tree
Showing 2 changed files with 255 additions and 120 deletions.
4 changes: 2 additions & 2 deletions pkg/models/appconfiguration/workload/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Workload struct {
*Job `yaml:",inline" json:",inline"`
}

func (w *Workload) MarshalJSON() ([]byte, error) {
func (w Workload) MarshalJSON() ([]byte, error) {
switch w.Header.Type {
case TypeService:
return json.Marshal(struct {
Expand Down Expand Up @@ -69,7 +69,7 @@ func (w *Workload) UnmarshalJSON(data []byte) error {
return err
}

func (w *Workload) MarshalYAML() (interface{}, error) {
func (w Workload) MarshalYAML() (interface{}, error) {
switch w.Header.Type {
case TypeService:
return struct {
Expand Down
Loading

0 comments on commit 0136769

Please sign in to comment.