You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, because the fixture is trying to get the object from the list of mocked resources in https://github.com/kubernetes/client-go/blob/master/testing/fixture.go#L146, a typical SSA apply will fail if the object is not created. This leads to a difference in real/test behavior in the fixture as a normal SSA Apply in Kubernetes can deal with a missing resource by creating it, while it will fail in the test fixture (as the resource would not be present in the mocked objects).
I thus suggest to reimplement the Apply-Behavior in a way that is agnostic to SSA and that is able to deal with this scenario.
The text was updated successfully, but these errors were encountered:
The test fixtures in client-go were originally written without SSA in mind. Now that Apply Patch type needs to be supported, the fixture was changed by trying to force all changes to be computed via StrategicMerge in https://github.com/kubernetes/client-go/blob/master/testing/fixture.go#L184
However, because the fixture is trying to get the object from the list of mocked resources in https://github.com/kubernetes/client-go/blob/master/testing/fixture.go#L146, a typical SSA apply will fail if the object is not created. This leads to a difference in real/test behavior in the fixture as a normal SSA Apply in Kubernetes can deal with a missing resource by creating it, while it will fail in the test fixture (as the resource would not be present in the mocked objects).
I thus suggest to reimplement the Apply-Behavior in a way that is agnostic to SSA and that is able to deal with this scenario.
The text was updated successfully, but these errors were encountered: