Skip to content

Commit

Permalink
reconciler: Fix Status JSON marshalling
Browse files Browse the repository at this point in the history
43587d4 broke JSON marshalling of Status by introducing a separate statusJSON
type and Unmarshal{JSON,YAML} methods, but didn't introduce the Marshal{JSON,YAML}
methods, which caused dictionary key mismatches as Status struct was used to marshal
instead of statusJSON.

Fix this by removing the whole statusJSON construct and add json and yaml tags to Status.
There is no need for filling in the `id` field when unmarshalling Status as this is completely
internal to the reconciler.

Fixes: 43587d4 ("reconciler: Implement tests using scripttest")

Signed-off-by: Jussi Maki <[email protected]>
  • Loading branch information
joamaki committed Oct 31, 2024
1 parent e0d473d commit 132edd6
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 37 deletions.
51 changes: 51 additions & 0 deletions reconciler/status_test.go
40 changes: 3 additions & 37 deletions reconciler/types.go

0 comments on commit 132edd6

Please sign in to comment.