This message was deleted.
# dotnet
s
This message was deleted.
t
I guess your mocks return null which causes this error. You’d have to actually implement
IMocks
.
b
thank you for a quick reply. I will try that.
I implemented IMocks, as you said. It worked. Now that I want to test kubernetes namspaces (only) I would have to create a separate test stack with kubernetes and kubernetese namspaces. It feels a bit clumbersome, but it works. I can live with that. To anyone else reading this. the solution here is to set up IMocks with
Copy code
var mocks = new Mock<IMocks>();

            mocks.Setup(m => m.NewResourceAsync(It.IsAny<string>(), It.IsAny<string>(),
                    It.IsAny<ImmutableDictionary<string, object>>(), It.IsAny<string>(), It.IsAny<string>()))
                .ReturnsAsync((string type, string name, ImmutableDictionary<string, object> inputs, string provider,
                    string id) => (name + "_id", inputs));
🙂