Skip to content

Instantly share code, notes, and snippets.

@jwillker
Created May 8, 2022 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwillker/3a0d2037dc5a0f64d51884da6a31d992 to your computer and use it in GitHub Desktop.
Save jwillker/3a0d2037dc5a0f64d51884da6a31d992 to your computer and use it in GitHub Desktop.
//more code
...
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
var deployment appsv1.Deployment
// Render the deployment object
err := Render(t, "../", "deployment.yaml", tt.args.Release, tt.args.Values, &deployment)
if err != nil {
fmt.Println(err)
}
assertName(t, tt.want.DeployName, deployment)
assertLabels(t, tt.want.DeployLabels, deployment)
assertAnnotations(t, tt.want.DeployAnnotations, deployment)
assertSelectorLabels(t, tt.want.DeploySelectorLabels, deployment)
assertStrategy(t, tt.want.DeployStrategy, deployment)
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment