mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 13:37:35 +00:00
feat: actions v2 api GA (#10364)
# Which Problems Are Solved The Actions v2beta API is not yet promoted to GA. # How the Problems Are Solved Promote Actions v2Beta API to Actions v2 API. # Additional Changes None # Additional Context None
This commit is contained in:
@@ -19,7 +19,7 @@ import (
|
||||
|
||||
func TestServer_CreateTarget(t *testing.T) {
|
||||
instance := integration.NewInstance(CTX)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorization(CTX, integration.UserTypeIAMOwner)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorizationToken(CTX, integration.UserTypeIAMOwner)
|
||||
type want struct {
|
||||
id bool
|
||||
creationDate bool
|
||||
@@ -36,7 +36,7 @@ func TestServer_CreateTarget(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "missing permission",
|
||||
ctx: instance.WithAuthorization(context.Background(), integration.UserTypeOrgOwner),
|
||||
ctx: instance.WithAuthorizationToken(context.Background(), integration.UserTypeOrgOwner),
|
||||
req: &action.CreateTargetRequest{
|
||||
Name: gofakeit.Name(),
|
||||
},
|
||||
@@ -243,7 +243,7 @@ func assertCreateTargetResponse(t *testing.T, creationDate, changeDate time.Time
|
||||
|
||||
func TestServer_UpdateTarget(t *testing.T) {
|
||||
instance := integration.NewInstance(CTX)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorization(CTX, integration.UserTypeIAMOwner)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorizationToken(CTX, integration.UserTypeIAMOwner)
|
||||
type args struct {
|
||||
ctx context.Context
|
||||
req *action.UpdateTargetRequest
|
||||
@@ -267,7 +267,7 @@ func TestServer_UpdateTarget(t *testing.T) {
|
||||
request.Id = targetID
|
||||
},
|
||||
args: args{
|
||||
ctx: instance.WithAuthorization(context.Background(), integration.UserTypeOrgOwner),
|
||||
ctx: instance.WithAuthorizationToken(context.Background(), integration.UserTypeOrgOwner),
|
||||
req: &action.UpdateTargetRequest{
|
||||
Name: gu.Ptr(gofakeit.Name()),
|
||||
},
|
||||
@@ -278,7 +278,6 @@ func TestServer_UpdateTarget(t *testing.T) {
|
||||
name: "not existing",
|
||||
prepare: func(request *action.UpdateTargetRequest) {
|
||||
request.Id = "notexisting"
|
||||
return
|
||||
},
|
||||
args: args{
|
||||
ctx: isolatedIAMOwnerCTX,
|
||||
@@ -461,7 +460,7 @@ func assertUpdateTargetResponse(t *testing.T, creationDate, changeDate time.Time
|
||||
|
||||
func TestServer_DeleteTarget(t *testing.T) {
|
||||
instance := integration.NewInstance(CTX)
|
||||
iamOwnerCtx := instance.WithAuthorization(CTX, integration.UserTypeIAMOwner)
|
||||
iamOwnerCtx := instance.WithAuthorizationToken(CTX, integration.UserTypeIAMOwner)
|
||||
tests := []struct {
|
||||
name string
|
||||
ctx context.Context
|
||||
@@ -472,7 +471,7 @@ func TestServer_DeleteTarget(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "missing permission",
|
||||
ctx: instance.WithAuthorization(context.Background(), integration.UserTypeOrgOwner),
|
||||
ctx: instance.WithAuthorizationToken(context.Background(), integration.UserTypeOrgOwner),
|
||||
req: &action.DeleteTargetRequest{
|
||||
Id: "notexisting",
|
||||
},
|
||||
|
Reference in New Issue
Block a user