Skip to content

Commit

Permalink
SCALRCORE-24861 Fix tests [API_BRANCH]
Browse files Browse the repository at this point in the history
  • Loading branch information
lyzohub committed Apr 10, 2023
1 parent 120b3a5 commit dcd4975
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions run_triggers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,16 @@ func TestRunTriggersRead(t *testing.T) {
Downstream: &Downstream{ID: wsTest1.ID},
Upstream: &Upstream{ID: wsTest2.ID},
}
created_trigger, err := client.RunTriggers.Create(ctx, options)
createdTrigger, err := client.RunTriggers.Create(ctx, options)
require.NoError(t, err)
assert.NotEmpty(t, created_trigger.ID)
assert.NotEmpty(t, createdTrigger.ID)

t.Run("get run trigger by id", func(t *testing.T) {
trigger, err := client.RunTriggers.Read(ctx, created_trigger.ID)
trigger, err := client.RunTriggers.Read(ctx, createdTrigger.ID)
require.NoError(t, err)
assert.Equal(t, created_trigger, trigger)
assert.Equal(t, createdTrigger.ID, trigger.ID)
assert.Equal(t, createdTrigger.Upstream.ID, trigger.Upstream.ID)
assert.Equal(t, createdTrigger.Downstream.ID, trigger.Downstream.ID)
})

t.Run("try to get run trigger with not valid ID", func(t *testing.T) {
Expand Down

0 comments on commit dcd4975

Please sign in to comment.