Skip to content

Commit

Permalink
start e2e with no bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Mendoza committed Mar 4, 2024
1 parent fd109f5 commit 0c45be9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controller/linodeobjectstoragebucket_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (r *LinodeObjectStorageBucketReconciler) Reconcile(ctx context.Context, req
return ctrl.Result{}, err
}

bs, err := scope.NewObjectStorageBucketScope(
bScope, err := scope.NewObjectStorageBucketScope(
ctx,
r.LinodeApiKey,
scope.ObjectStorageBucketScopeParams{
Expand All @@ -101,7 +101,7 @@ func (r *LinodeObjectStorageBucketReconciler) Reconcile(ctx context.Context, req
return ctrl.Result{}, fmt.Errorf("failed to create object storage bucket scope: %w", err)
}

return r.reconcile(ctx, bs)
return r.reconcile(ctx, bScope)
}

func (r *LinodeObjectStorageBucketReconciler) reconcile(ctx context.Context, bScope *scope.ObjectStorageBucketScope) (res ctrl.Result, reterr error) {
Expand Down
3 changes: 3 additions & 0 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ callLinodeApiGet:

callLinodeApiPost:
@curl -s -H "Authorization: Bearer $$LINODE_TOKEN" -H "Content-Type: application/json" -d "$$BODY" -X POST "https://$(TARGET_API)/$(TARGET_API_VERSION)/$$URI"

callLinodeApiDelete:
@curl -s -H "Authorization: Bearer $$LINODE_TOKEN" -X DELETE "https://$(TARGET_API)/$(TARGET_API_VERSION)/$$URI"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |-
URI="object-storage/buckets/us-sea-1/linodeobjectstoragebucket-sample" make callLinodeApiDelete || exit 0

0 comments on commit 0c45be9

Please sign in to comment.