-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCM-7254 | feat: Move edit machinepool non-cmd funcs to pkg and test
- Loading branch information
1 parent
de37e9d
commit eeb9d94
Showing
10 changed files
with
898 additions
and
963 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package machinepool | ||
|
||
import ( | ||
. "github.com/onsi/ginkgo/v2" | ||
) | ||
|
||
// Will un-comment and become the cmd test once the work on refactoring this command is finalized | ||
var _ = Describe("Edit Machinepool", func() { | ||
|
||
/*Context("getNodePoolReplicas", func() { | ||
nodePoolId := "test-nodepool" | ||
It("KO: Fails if autoscaling is not set", func() { | ||
Cmd.Flags().Set("min-replicas", "2") | ||
_, _, _, _, err := getNodePoolReplicas( | ||
Cmd, rosa.NewRuntime().Reporter, nodePoolId, 2, nil, true) | ||
Expect(err).Error().Should(HaveOccurred()) | ||
Expect(err.Error()).To(Equal( | ||
"Autoscaling is not enabled on machine pool 'test-nodepool'. can't set min or max replicas")) | ||
}) | ||
It("KO: Fails to set replicas if autoscaling is enabled", func() { | ||
autoScaling := &cmv1.NodePoolAutoscaling{} | ||
Cmd.Flags().Set("enable-autoscaling", "true") | ||
Cmd.Flags().Set("replicas", "3") | ||
_, _, _, _, err := getNodePoolReplicas( | ||
Cmd, rosa.NewRuntime().Reporter, nodePoolId, 2, autoScaling, true) | ||
Expect(err).Error().Should(HaveOccurred()) | ||
Expect(err.Error()).To(Equal("Autoscaling enabled on machine pool 'test-nodepool'. can't set replicas")) | ||
}) | ||
})*/ | ||
}) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.