Skip to content

Commit

Permalink
revise test case annotation and follow review opinion
Browse files Browse the repository at this point in the history
Signed-off-by: Shane <[email protected]>
  • Loading branch information
ctccxxd committed Nov 24, 2024
1 parent 0fb7542 commit 22b489d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ To learn more about active deprecations, we recommend checking [GitHub Discussio
### New

-**General**: Add scaleTargetRef exists check in webhook and revise some variable name ([#6350](https://github.com/kedacore/keda/pull/6350))
- **General**: Introduce new NSQ scaler ([#3281](https://github.com/kedacore/keda/issues/3281))

#### Experimental

Expand Down
2 changes: 1 addition & 1 deletion apis/keda/v1alpha1/scaledobject_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (so *ScaledObject) CheckScaleTargetRefIfExist(ctx context.Context) error {
gvkString := soGvkr.GVKString()
unstruct := &unstructured.Unstructured{}
unstruct.SetGroupVersionKind(soGvkr.GroupVersionKind())
if err := kc.Get(ctx, client.ObjectKey{Namespace: so.Namespace, Name: so.Spec.ScaleTargetRef.Name}, unstruct); err != nil {
if err := getFromCacheOrDirect(ctx, client.ObjectKey{Namespace: so.Namespace, Name: so.Spec.ScaleTargetRef.Name}, unstruct); err != nil {
// resource doesn't exist
scaledobjectlog.Error(err, message.ScaleTargetNotFoundMsg, "resource", gvkString, "name", so.Spec.ScaleTargetRef.Name)
return err
Expand Down
2 changes: 1 addition & 1 deletion apis/keda/v1alpha1/scaledobject_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ var _ = It("shouldn't validate the so creation with cpu and memory when stateful
}).Should(HaveOccurred())
})

var _ = It("shouldn't validate the so creation without cpu and memory when custom resources without real StatefulSet", func() {
var _ = It("shouldn't validate the so creation without cpu and memory when custom resources and real StatefulSet not found", func() {

namespaceName := "crd-not-resources"
namespace := createNamespace(namespaceName)
Expand Down

0 comments on commit 22b489d

Please sign in to comment.