crossplane / crossplane-tools

Experimental code generators for Crossplane controllers.
https://crossplane.io
Apache License 2.0
34 stars 26 forks source link

Test that generated method sets satisfy crossplane-runtime interfaces #3

Closed negz closed 5 years ago

negz commented 5 years ago

What problem are you facing?

angryjet intends to generate method sets for types such that they satisfy various crossplane-runtime interfaces. Per https://github.com/crossplaneio/crossplane/pull/856/files#r330327715 previously we would add interface satisfaction tests, e.g.:

It's less likely that generated code will accidentally not satisfy these interfaces, but still worth testing. It's possible for example that angryjet is targeting a newer or older version of crossplane-runtime than the project using generation is targeting.

How could Crossplane help solve your problem?

Teach angryjet to generate interface satisfaction tests, e.g.:

var _ resource.Claim = &RedisCluster{}
negz commented 5 years ago

Dupe of #2.