mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:17:34 +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:
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
func TestServer_SetExecution_Request(t *testing.T) {
|
||||
instance := integration.NewInstance(CTX)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorization(CTX, integration.UserTypeIAMOwner)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorizationToken(CTX, integration.UserTypeIAMOwner)
|
||||
targetResp := instance.CreateTarget(isolatedIAMOwnerCTX, t, "", "https://notexisting", domain.TargetTypeWebhook, false)
|
||||
|
||||
tests := []struct {
|
||||
@@ -29,7 +29,7 @@ func TestServer_SetExecution_Request(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "missing permission",
|
||||
ctx: instance.WithAuthorization(context.Background(), integration.UserTypeOrgOwner),
|
||||
ctx: instance.WithAuthorizationToken(context.Background(), integration.UserTypeOrgOwner),
|
||||
req: &action.SetExecutionRequest{
|
||||
Condition: &action.Condition{
|
||||
ConditionType: &action.Condition_Request{
|
||||
@@ -155,7 +155,7 @@ func TestServer_SetExecution_Request(t *testing.T) {
|
||||
assertSetExecutionResponse(t, creationDate, setDate, tt.wantSetDate, got)
|
||||
|
||||
// cleanup to not impact other requests
|
||||
instance.DeleteExecution(tt.ctx, t, tt.req.GetCondition())
|
||||
deleteExecution(tt.ctx, t, instance, tt.req.GetCondition())
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ func assertSetExecutionResponse(t *testing.T, creationDate, setDate time.Time, e
|
||||
|
||||
func TestServer_SetExecution_Response(t *testing.T) {
|
||||
instance := integration.NewInstance(CTX)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorization(CTX, integration.UserTypeIAMOwner)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorizationToken(CTX, integration.UserTypeIAMOwner)
|
||||
targetResp := instance.CreateTarget(isolatedIAMOwnerCTX, t, "", "https://notexisting", domain.TargetTypeWebhook, false)
|
||||
|
||||
tests := []struct {
|
||||
@@ -186,7 +186,7 @@ func TestServer_SetExecution_Response(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "missing permission",
|
||||
ctx: instance.WithAuthorization(context.Background(), integration.UserTypeOrgOwner),
|
||||
ctx: instance.WithAuthorizationToken(context.Background(), integration.UserTypeOrgOwner),
|
||||
req: &action.SetExecutionRequest{
|
||||
Condition: &action.Condition{
|
||||
ConditionType: &action.Condition_Response{
|
||||
@@ -311,14 +311,14 @@ func TestServer_SetExecution_Response(t *testing.T) {
|
||||
assertSetExecutionResponse(t, creationDate, setDate, tt.wantSetDate, got)
|
||||
|
||||
// cleanup to not impact other requests
|
||||
instance.DeleteExecution(tt.ctx, t, tt.req.GetCondition())
|
||||
deleteExecution(tt.ctx, t, instance, tt.req.GetCondition())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestServer_SetExecution_Event(t *testing.T) {
|
||||
instance := integration.NewInstance(CTX)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorization(CTX, integration.UserTypeIAMOwner)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorizationToken(CTX, integration.UserTypeIAMOwner)
|
||||
targetResp := instance.CreateTarget(isolatedIAMOwnerCTX, t, "", "https://notexisting", domain.TargetTypeWebhook, false)
|
||||
|
||||
tests := []struct {
|
||||
@@ -330,7 +330,7 @@ func TestServer_SetExecution_Event(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "missing permission",
|
||||
ctx: instance.WithAuthorization(context.Background(), integration.UserTypeOrgOwner),
|
||||
ctx: instance.WithAuthorizationToken(context.Background(), integration.UserTypeOrgOwner),
|
||||
req: &action.SetExecutionRequest{
|
||||
Condition: &action.Condition{
|
||||
ConditionType: &action.Condition_Event{
|
||||
@@ -474,14 +474,14 @@ func TestServer_SetExecution_Event(t *testing.T) {
|
||||
assertSetExecutionResponse(t, creationDate, setDate, tt.wantSetDate, got)
|
||||
|
||||
// cleanup to not impact other requests
|
||||
instance.DeleteExecution(tt.ctx, t, tt.req.GetCondition())
|
||||
deleteExecution(tt.ctx, t, instance, tt.req.GetCondition())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestServer_SetExecution_Function(t *testing.T) {
|
||||
instance := integration.NewInstance(CTX)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorization(CTX, integration.UserTypeIAMOwner)
|
||||
isolatedIAMOwnerCTX := instance.WithAuthorizationToken(CTX, integration.UserTypeIAMOwner)
|
||||
targetResp := instance.CreateTarget(isolatedIAMOwnerCTX, t, "", "https://notexisting", domain.TargetTypeWebhook, false)
|
||||
|
||||
tests := []struct {
|
||||
@@ -493,7 +493,7 @@ func TestServer_SetExecution_Function(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "missing permission",
|
||||
ctx: instance.WithAuthorization(context.Background(), integration.UserTypeOrgOwner),
|
||||
ctx: instance.WithAuthorizationToken(context.Background(), integration.UserTypeOrgOwner),
|
||||
req: &action.SetExecutionRequest{
|
||||
Condition: &action.Condition{
|
||||
ConditionType: &action.Condition_Response{
|
||||
@@ -559,7 +559,7 @@ func TestServer_SetExecution_Function(t *testing.T) {
|
||||
assertSetExecutionResponse(t, creationDate, setDate, tt.wantSetDate, got)
|
||||
|
||||
// cleanup to not impact other requests
|
||||
instance.DeleteExecution(tt.ctx, t, tt.req.GetCondition())
|
||||
deleteExecution(tt.ctx, t, instance, tt.req.GetCondition())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user