Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Olshevski committed Dec 12, 2023
1 parent e2a2df2 commit 8483048
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/reconstitution/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestManagerBasics(t *testing.T) {
comp.Status.CurrentState = &apiv1.Synthesis{
ObservedCompositionGeneration: comp.Generation,
ResourceSlices: []*apiv1.ResourceSliceRef{{Name: "test-slice"}},
Synthesized: true,
}
require.NoError(t, client.Status().Update(ctx, comp))

Expand Down
3 changes: 2 additions & 1 deletion internal/reconstitution/reconstituter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ func TestReconstituterIntegration(t *testing.T) {
comp.Status.CurrentState = &apiv1.Synthesis{
ObservedCompositionGeneration: comp.Generation,
ResourceSlices: []*apiv1.ResourceSliceRef{{Name: "test-slice"}},
Synthesized: true,
}
require.NoError(t, client.Status().Update(ctx, comp))

slice := &apiv1.ResourceSlice{}
slice.Name = "test-slice"
slice.Namespace = "default"
slice.Spec.CompositionGeneration = comp.Generation
slice.Spec.CompositionGeneration = comp.Generation // TODO: Do we actually need this?
slice.Spec.Resources = []apiv1.Manifest{{
Manifest: `{"kind":"baz","apiVersion":"any","metadata":{"name":"foo","namespace":"bar"}}`,
}}
Expand Down
1 change: 1 addition & 0 deletions internal/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func NewContext(t *testing.T) context.Context {
}

func NewManager(t *testing.T) *Manager {
t.Parallel()
_, b, _, _ := goruntime.Caller(0)
root := filepath.Join(filepath.Dir(b), "..", "..")

Expand Down

0 comments on commit 8483048

Please sign in to comment.