Skip to content

Commit

Permalink
Add a test for returning eksnodeclass-hash-version on Create()
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Apr 12, 2024
1 parent c730713 commit 001b59e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/cloudprovider/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ var _ = Describe("CloudProvider", func() {
_, ok := cloudProviderNodeClaim.ObjectMeta.Annotations[v1beta1.AnnotationEC2NodeClassHash]
Expect(ok).To(BeTrue())
})
It("should return NodeClass Hash Version on the nodeClaim", func() {
ExpectApplied(ctx, env.Client, nodePool, nodeClass, nodeClaim)
cloudProviderNodeClaim, err := cloudProvider.Create(ctx, nodeClaim)
Expect(err).To(BeNil())
Expect(cloudProviderNodeClaim).ToNot(BeNil())
v, ok := cloudProviderNodeClaim.ObjectMeta.Annotations[v1beta1.AnnotationEC2NodeClassHashVersion]
Expect(ok).To(BeTrue())
Expect(v).To(Equal(v1beta1.EC2NodeClassHashVersion))
})
Context("EC2 Context", func() {
contextID := "context-1234"
It("should set context on the CreateFleet request if specified on the NodePool", func() {
Expand Down

0 comments on commit 001b59e

Please sign in to comment.