diff --git a/internal/pkg/service/stream/definition/repository/sink/sink_enable_test.go b/internal/pkg/service/stream/definition/repository/sink/sink_enable_test.go index fad947e735..f196396c7e 100644 --- a/internal/pkg/service/stream/definition/repository/sink/sink_enable_test.go +++ b/internal/pkg/service/stream/definition/repository/sink/sink_enable_test.go @@ -106,7 +106,7 @@ func TestSinkRepository_Enable(t *testing.T) { now = now.Add(time.Hour) sink, err := repo.RollbackVersion(sinkKey, now, by, 2).Do(ctx).ResultOrErr() require.NoError(t, err) - assert.True(t, sink.IsDisabled()) + assert.False(t, sink.IsDisabled()) // Rollback intentionally doesn't change disabled/enabled state assert.Equal(t, definition.VersionNumber(4), sink.VersionNumber()) } @@ -293,6 +293,13 @@ func TestSinkRepository_EnableSinksOnSourceEnable(t *testing.T) { source, err := d.DefinitionRepository().Source().RollbackVersion(sourceKey, now, by, 2).Do(ctx).ResultOrErr() require.NoError(t, err) assert.Equal(t, definition.VersionNumber(4), source.Version.Number) + assert.False(t, source.IsDisabled()) // Rollback intentionally doesn't change disabled/enabled state + } + { + // Disable the Source + now = now.Add(time.Hour) + source, err := d.DefinitionRepository().Source().Disable(sourceKey, now, by, "test").Do(ctx).ResultOrErr() + require.NoError(t, err) assert.True(t, source.IsDisabled()) } { diff --git a/internal/pkg/service/stream/definition/repository/sink/sink_version.go b/internal/pkg/service/stream/definition/repository/sink/sink_version.go index 4248aed9f6..7907539f34 100644 --- a/internal/pkg/service/stream/definition/repository/sink/sink_version.go +++ b/internal/pkg/service/stream/definition/repository/sink/sink_version.go @@ -54,6 +54,15 @@ func (r *Repository) RollbackVersion(k key.SinkKey, now time.Time, by definition // Prepare the new value versionDescription := fmt.Sprintf(`Rollback to version "%d".`, targetVersion.Version.Number) updated = deepcopy.Copy(*targetVersion).(definition.Sink) + + // Preserve Disabled and Deleted states from the latest version. + // Without this it would be possible to bypass the Enable/Undelete event and avoid billing. + updated.Disabled = deepcopy.Copy(latestVersion.Disabled).(*definition.Disabled) + updated.Enabled = deepcopy.Copy(latestVersion.Enabled).(*definition.Enabled) + updated.Deleted = deepcopy.Copy(latestVersion.Deleted).(*definition.Deleted) + updated.Undeleted = deepcopy.Copy(latestVersion.Undeleted).(*definition.Undeleted) + + // Increase version updated.Version = latestVersion.Version updated.IncrementVersion(updated, now, by, versionDescription) return r.save(ctx, now, by, latestVersion, &updated) diff --git a/internal/pkg/service/stream/definition/repository/source/source_version.go b/internal/pkg/service/stream/definition/repository/source/source_version.go index 6e4c93c8ac..4e851afcec 100644 --- a/internal/pkg/service/stream/definition/repository/source/source_version.go +++ b/internal/pkg/service/stream/definition/repository/source/source_version.go @@ -54,6 +54,15 @@ func (r *Repository) RollbackVersion(k key.SourceKey, now time.Time, by definiti // Prepare the new value versionDescription := fmt.Sprintf(`Rollback to version "%d".`, targetVersion.Version.Number) updated = deepcopy.Copy(*targetVersion).(definition.Source) + + // Preserve Disabled and Deleted states from the latest version. + // Without this it would be possible to bypass the Enable/Undelete event and avoid billing. + updated.Disabled = deepcopy.Copy(latestVersion.Disabled).(*definition.Disabled) + updated.Enabled = deepcopy.Copy(latestVersion.Enabled).(*definition.Enabled) + updated.Deleted = deepcopy.Copy(latestVersion.Deleted).(*definition.Deleted) + updated.Undeleted = deepcopy.Copy(latestVersion.Undeleted).(*definition.Undeleted) + + // Increase version updated.Version = latestVersion.Version updated.IncrementVersion(updated, now, by, versionDescription) return r.save(ctx, now, by, latestVersion, &updated) diff --git a/test/stream/api/sink/create-001-minimal-and-get/001-create-source/request.json b/test/stream/api/sink/create-001-minimal-and-get/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-001-minimal-and-get/001-create-source/request.json +++ b/test/stream/api/sink/create-001-minimal-and-get/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-001-minimal-and-get/003-create-sink/request.json b/test/stream/api/sink/create-001-minimal-and-get/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/create-001-minimal-and-get/003-create-sink/request.json +++ b/test/stream/api/sink/create-001-minimal-and-get/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-002-with-id-and-get/001-create-source/request.json b/test/stream/api/sink/create-002-with-id-and-get/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-002-with-id-and-get/001-create-source/request.json +++ b/test/stream/api/sink/create-002-with-id-and-get/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-002-with-id-and-get/003-create-sink/request.json b/test/stream/api/sink/create-002-with-id-and-get/003-create-sink/request.json index 95625cb99a..f57f555898 100644 --- a/test/stream/api/sink/create-002-with-id-and-get/003-create-sink/request.json +++ b/test/stream/api/sink/create-002-with-id-and-get/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-003-weird-id-and-get/001-create-source/request.json b/test/stream/api/sink/create-003-weird-id-and-get/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-003-weird-id-and-get/001-create-source/request.json +++ b/test/stream/api/sink/create-003-weird-id-and-get/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-003-weird-id-and-get/003-create-sink/request.json b/test/stream/api/sink/create-003-weird-id-and-get/003-create-sink/request.json index 6df5d3d57e..1dd951274a 100644 --- a/test/stream/api/sink/create-003-weird-id-and-get/003-create-sink/request.json +++ b/test/stream/api/sink/create-003-weird-id-and-get/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-004-with-description-and-get/001-create-source/request.json b/test/stream/api/sink/create-004-with-description-and-get/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-004-with-description-and-get/001-create-source/request.json +++ b/test/stream/api/sink/create-004-with-description-and-get/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-004-with-description-and-get/003-create-sink/request.json b/test/stream/api/sink/create-004-with-description-and-get/003-create-sink/request.json index 3920bdf177..d93fe1da84 100644 --- a/test/stream/api/sink/create-004-with-description-and-get/003-create-sink/request.json +++ b/test/stream/api/sink/create-004-with-description-and-get/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-005-invalid-type-400/001-create-source/request.json b/test/stream/api/sink/create-005-invalid-type-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-005-invalid-type-400/001-create-source/request.json +++ b/test/stream/api/sink/create-005-invalid-type-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-005-invalid-type-400/003-create-sink/request.json b/test/stream/api/sink/create-005-invalid-type-400/003-create-sink/request.json index dfd640b77f..28743fd2a9 100644 --- a/test/stream/api/sink/create-005-invalid-type-400/003-create-sink/request.json +++ b/test/stream/api/sink/create-005-invalid-type-400/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-006-id-empty-400/001-create-source/request.json b/test/stream/api/sink/create-006-id-empty-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-006-id-empty-400/001-create-source/request.json +++ b/test/stream/api/sink/create-006-id-empty-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-006-id-empty-400/003-create-sink/request.json b/test/stream/api/sink/create-006-id-empty-400/003-create-sink/request.json index 05bdbb0fc6..bbc51823e7 100644 --- a/test/stream/api/sink/create-006-id-empty-400/003-create-sink/request.json +++ b/test/stream/api/sink/create-006-id-empty-400/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-006-id-max-length-400/001-create-source/request.json b/test/stream/api/sink/create-006-id-max-length-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-006-id-max-length-400/001-create-source/request.json +++ b/test/stream/api/sink/create-006-id-max-length-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-006-id-max-length-400/003-create-sink/request.json b/test/stream/api/sink/create-006-id-max-length-400/003-create-sink/request.json index 122d889759..91aa0fce82 100644 --- a/test/stream/api/sink/create-006-id-max-length-400/003-create-sink/request.json +++ b/test/stream/api/sink/create-006-id-max-length-400/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-008-name-empty-400/001-create-source/request.json b/test/stream/api/sink/create-008-name-empty-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-008-name-empty-400/001-create-source/request.json +++ b/test/stream/api/sink/create-008-name-empty-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-008-name-empty-400/003-create-sink/request.json b/test/stream/api/sink/create-008-name-empty-400/003-create-sink/request.json index c8929b0eef..a2a5790af0 100644 --- a/test/stream/api/sink/create-008-name-empty-400/003-create-sink/request.json +++ b/test/stream/api/sink/create-008-name-empty-400/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-009-name-max-length-400/001-create-source/request.json b/test/stream/api/sink/create-009-name-max-length-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-009-name-max-length-400/001-create-source/request.json +++ b/test/stream/api/sink/create-009-name-max-length-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-009-name-max-length-400/003-create-sink/request.json b/test/stream/api/sink/create-009-name-max-length-400/003-create-sink/request.json index fc0e4f03f0..230e894dc9 100644 --- a/test/stream/api/sink/create-009-name-max-length-400/003-create-sink/request.json +++ b/test/stream/api/sink/create-009-name-max-length-400/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-010-missing-storage-token-400/001-create-sink/request.json b/test/stream/api/sink/create-010-missing-storage-token-400/001-create-sink/request.json index 2964dc7281..18bc7b75ea 100644 --- a/test/stream/api/sink/create-010-missing-storage-token-400/001-create-sink/request.json +++ b/test/stream/api/sink/create-010-missing-storage-token-400/001-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json" diff --git a/test/stream/api/sink/create-011-exists-409/001-create-source/request.json b/test/stream/api/sink/create-011-exists-409/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-011-exists-409/001-create-source/request.json +++ b/test/stream/api/sink/create-011-exists-409/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-011-exists-409/003-create-sink/request.json b/test/stream/api/sink/create-011-exists-409/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/create-011-exists-409/003-create-sink/request.json +++ b/test/stream/api/sink/create-011-exists-409/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-011-exists-409/005-create-sink-exists/request.json b/test/stream/api/sink/create-011-exists-409/005-create-sink-exists/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/create-011-exists-409/005-create-sink-exists/request.json +++ b/test/stream/api/sink/create-011-exists-409/005-create-sink-exists/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-012-invalid-jsonnet-template/001-create-source/request.json b/test/stream/api/sink/create-012-invalid-jsonnet-template/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-012-invalid-jsonnet-template/001-create-source/request.json +++ b/test/stream/api/sink/create-012-invalid-jsonnet-template/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-012-invalid-jsonnet-template/003-create-sink/request.json b/test/stream/api/sink/create-012-invalid-jsonnet-template/003-create-sink/request.json index a5b6fd17de..2ea93a822b 100644 --- a/test/stream/api/sink/create-012-invalid-jsonnet-template/003-create-sink/request.json +++ b/test/stream/api/sink/create-012-invalid-jsonnet-template/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-013-duplicite-creation/001-create-source/request.json b/test/stream/api/sink/create-013-duplicite-creation/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-013-duplicite-creation/001-create-source/request.json +++ b/test/stream/api/sink/create-013-duplicite-creation/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-013-duplicite-creation/003-create-sink/request.json b/test/stream/api/sink/create-013-duplicite-creation/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/create-013-duplicite-creation/003-create-sink/request.json +++ b/test/stream/api/sink/create-013-duplicite-creation/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-013-duplicite-creation/004-create-duplicate-sink/request.json b/test/stream/api/sink/create-013-duplicite-creation/004-create-duplicate-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/create-013-duplicite-creation/004-create-duplicate-sink/request.json +++ b/test/stream/api/sink/create-013-duplicite-creation/004-create-duplicate-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-013-in-parallel/001-create-source/request.json b/test/stream/api/sink/create-013-in-parallel/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-013-in-parallel/001-create-source/request.json +++ b/test/stream/api/sink/create-013-in-parallel/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-013-in-parallel/003-create-sink-1/request.json b/test/stream/api/sink/create-013-in-parallel/003-create-sink-1/request.json index 9649c0163f..ddc989f49b 100644 --- a/test/stream/api/sink/create-013-in-parallel/003-create-sink-1/request.json +++ b/test/stream/api/sink/create-013-in-parallel/003-create-sink-1/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-013-in-parallel/003-create-sink-2/request.json b/test/stream/api/sink/create-013-in-parallel/003-create-sink-2/request.json index cf91f0f644..f9dc645dfa 100644 --- a/test/stream/api/sink/create-013-in-parallel/003-create-sink-2/request.json +++ b/test/stream/api/sink/create-013-in-parallel/003-create-sink-2/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-013-in-parallel/003-create-sink-3/request.json b/test/stream/api/sink/create-013-in-parallel/003-create-sink-3/request.json index 0aed5ebb8b..a6f9141f66 100644 --- a/test/stream/api/sink/create-013-in-parallel/003-create-sink-3/request.json +++ b/test/stream/api/sink/create-013-in-parallel/003-create-sink-3/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-014-disable-enable/001-create-source/request.json b/test/stream/api/sink/create-014-disable-enable/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-014-disable-enable/001-create-source/request.json +++ b/test/stream/api/sink/create-014-disable-enable/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-014-disable-enable/003-create-sink/request.json b/test/stream/api/sink/create-014-disable-enable/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/create-014-disable-enable/003-create-sink/request.json +++ b/test/stream/api/sink/create-014-disable-enable/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-015-disable-rollback/001-create-source/expected-http-code b/test/stream/api/sink/create-015-disable-rollback/001-create-source/expected-http-code new file mode 100644 index 0000000000..8f897c857d --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/001-create-source/expected-http-code @@ -0,0 +1 @@ +202 diff --git a/test/stream/api/sink/create-015-disable-rollback/001-create-source/expected-response.json b/test/stream/api/sink/create-015-disable-rollback/001-create-source/expected-response.json new file mode 100644 index 0000000000..1e07d5213f --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/001-create-source/expected-response.json @@ -0,0 +1,8 @@ +{ + "taskId": "api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "type": "api.create.source", + "url": "https://stream.keboola.local/v1/tasks/api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "status": "processing", + "isFinished": false, + "createdAt": "%s" +} diff --git a/test/stream/api/sink/create-015-disable-rollback/001-create-source/request.json b/test/stream/api/sink/create-015-disable-rollback/001-create-source/request.json new file mode 100644 index 0000000000..1104311603 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/001-create-source/request.json @@ -0,0 +1,12 @@ +{ + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", + "method": "POST", + "headers": { + "Content-Type": "application/json", + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "body": { + "name": "My Source", + "type": "http" + } +} diff --git a/test/templates/api/projects/instance-delete/005-list-instances/expected-http-code b/test/stream/api/sink/create-015-disable-rollback/002-poll-source/expected-http-code similarity index 100% rename from test/templates/api/projects/instance-delete/005-list-instances/expected-http-code rename to test/stream/api/sink/create-015-disable-rollback/002-poll-source/expected-http-code diff --git a/test/stream/api/sink/create-015-disable-rollback/002-poll-source/expected-response.json b/test/stream/api/sink/create-015-disable-rollback/002-poll-source/expected-response.json new file mode 100644 index 0000000000..888d20330b --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/002-poll-source/expected-response.json @@ -0,0 +1,17 @@ +{ + "taskId": "api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "type": "api.create.source", + "url": "https://stream.keboola.local/v1/tasks/api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "status": "success", + "isFinished": true, + "createdAt": "%s", + "finishedAt": "%s", + "duration": %d, + "result": "Source has been created successfully.", + "outputs": { + "url": "https://stream.keboola.local/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source", + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source" + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/002-poll-source/request.json b/test/stream/api/sink/create-015-disable-rollback/002-poll-source/request.json new file mode 100644 index 0000000000..59eb032876 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/002-poll-source/request.json @@ -0,0 +1,11 @@ +{ + "path": "<<001-create-source:response.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "repeat": { + "until": "status != 'processing'", + "timeout": 60 + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/003-create-sink/expected-http-code b/test/stream/api/sink/create-015-disable-rollback/003-create-sink/expected-http-code new file mode 100644 index 0000000000..8f897c857d --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/003-create-sink/expected-http-code @@ -0,0 +1 @@ +202 diff --git a/test/stream/api/sink/create-015-disable-rollback/003-create-sink/expected-response.json b/test/stream/api/sink/create-015-disable-rollback/003-create-sink/expected-response.json new file mode 100644 index 0000000000..d978effbfa --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/003-create-sink/expected-response.json @@ -0,0 +1,8 @@ +{ + "taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink/%s", + "type": "api.create.sink", + "url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink/%s", + "status": "processing", + "isFinished": false, + "createdAt": "%s" +} diff --git a/test/stream/api/sink/create-015-disable-rollback/003-create-sink/request.json b/test/stream/api/sink/create-015-disable-rollback/003-create-sink/request.json new file mode 100644 index 0000000000..66d95dcc74 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/003-create-sink/request.json @@ -0,0 +1,28 @@ +{ + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", + "method": "POST", + "headers": { + "Content-Type": "application/json", + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "body": { + "name": "My Sink", + "type": "table", + "table": { + "type": "keboola", + "tableId": "in.c-my-bucket.my-table", + "mapping": { + "columns": [ + { + "type": "uuid", + "name": "id" + }, + { + "type": "body", + "name": "body" + } + ] + } + } + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/004-poll-sink/expected-http-code b/test/stream/api/sink/create-015-disable-rollback/004-poll-sink/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/004-poll-sink/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/stream/api/sink/create-015-disable-rollback/004-poll-sink/expected-response.json b/test/stream/api/sink/create-015-disable-rollback/004-poll-sink/expected-response.json new file mode 100644 index 0000000000..aefccadca5 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/004-poll-sink/expected-response.json @@ -0,0 +1,18 @@ +{ + "taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink/%s", + "type": "api.create.sink", + "url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink/%s", + "status": "success", + "isFinished": true, + "createdAt": "%s", + "finishedAt": "%s", + "duration": %d, + "result": "Sink has been created successfully.", + "outputs": { + "url": "https://stream.keboola.local/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink", + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source", + "sinkId": "my-sink" + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/004-poll-sink/request.json b/test/stream/api/sink/create-015-disable-rollback/004-poll-sink/request.json new file mode 100644 index 0000000000..13f03bc884 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/004-poll-sink/request.json @@ -0,0 +1,11 @@ +{ + "path": "<<003-create-sink:response.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "repeat": { + "until": "status != 'processing'", + "timeout": 60 + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/005-disable-sink/expected-http-code b/test/stream/api/sink/create-015-disable-rollback/005-disable-sink/expected-http-code new file mode 100644 index 0000000000..8f897c857d --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/005-disable-sink/expected-http-code @@ -0,0 +1 @@ +202 diff --git a/test/stream/api/sink/create-015-disable-rollback/005-disable-sink/expected-response.json b/test/stream/api/sink/create-015-disable-rollback/005-disable-sink/expected-response.json new file mode 100644 index 0000000000..6ede9d7e38 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/005-disable-sink/expected-response.json @@ -0,0 +1,8 @@ +{ + "taskId": "api.disable.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink/%s", + "type": "api.disable.sink", + "url": "https://stream.keboola.local/v1/tasks/api.disable.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink/%s", + "status": "processing", + "isFinished": false, + "createdAt": "%s" +} diff --git a/test/stream/api/sink/create-015-disable-rollback/005-disable-sink/request.json b/test/stream/api/sink/create-015-disable-rollback/005-disable-sink/request.json new file mode 100644 index 0000000000..0d912659e3 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/005-disable-sink/request.json @@ -0,0 +1,7 @@ +{ + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/disable", + "method": "PUT", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/006-poll-sink/expected-http-code b/test/stream/api/sink/create-015-disable-rollback/006-poll-sink/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/006-poll-sink/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/stream/api/sink/create-015-disable-rollback/006-poll-sink/expected-response.json b/test/stream/api/sink/create-015-disable-rollback/006-poll-sink/expected-response.json new file mode 100644 index 0000000000..f4a07b6cfa --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/006-poll-sink/expected-response.json @@ -0,0 +1,18 @@ +{ + "taskId": "api.disable.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink/%s", + "type": "api.disable.sink", + "url": "https://stream.keboola.local/v1/tasks/api.disable.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink/%s", + "status": "success", + "isFinished": true, + "createdAt": "%s", + "finishedAt": "%s", + "duration": %d, + "result": "Sink has been disabled successfully.", + "outputs": { + "url": "https://stream.keboola.local/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink", + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source", + "sinkId": "my-sink" + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/006-poll-sink/request.json b/test/stream/api/sink/create-015-disable-rollback/006-poll-sink/request.json new file mode 100644 index 0000000000..43dc7ddbf7 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/006-poll-sink/request.json @@ -0,0 +1,11 @@ +{ + "path": "<<005-disable-sink:response.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "repeat": { + "until": "status != 'processing'", + "timeout": 60 + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/007-get-sink/expected-http-code b/test/stream/api/sink/create-015-disable-rollback/007-get-sink/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/007-get-sink/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/stream/api/sink/create-015-disable-rollback/007-get-sink/expected-response.json b/test/stream/api/sink/create-015-disable-rollback/007-get-sink/expected-response.json new file mode 100644 index 0000000000..767eaa47be --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/007-get-sink/expected-response.json @@ -0,0 +1,59 @@ +{ + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source", + "sinkId": "my-sink", + "type": "table", + "name": "My Sink", + "description": "", + "table": { + "type": "keboola", + "tableId": "in.c-my-bucket.my-table", + "mapping": { + "columns": [ + { + "type": "uuid", + "name": "id" + }, + { + "type": "body", + "name": "body" + } + ] + } + }, + "version": { + "number": 2, + "hash": "%s", + "description": "Disabled.", + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + } + }, + "created": { + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + } + }, + "disabled": { + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + }, + "reason": "API" + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/007-get-sink/request.json b/test/stream/api/sink/create-015-disable-rollback/007-get-sink/request.json new file mode 100644 index 0000000000..aceeb4f2f1 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/007-get-sink/request.json @@ -0,0 +1,7 @@ +{ + "path": "<<004-poll-sink:response.outputs.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/008-rollback-version/expected-http-code b/test/stream/api/sink/create-015-disable-rollback/008-rollback-version/expected-http-code new file mode 100644 index 0000000000..8f897c857d --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/008-rollback-version/expected-http-code @@ -0,0 +1 @@ +202 diff --git a/test/stream/api/sink/create-015-disable-rollback/008-rollback-version/expected-response.json b/test/stream/api/sink/create-015-disable-rollback/008-rollback-version/expected-response.json new file mode 100644 index 0000000000..a3e83a0de2 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/008-rollback-version/expected-response.json @@ -0,0 +1,8 @@ +{ + "taskId": "api.rollback.sinkVersion/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "type": "api.rollback.sinkVersion", + "url": "https://stream.keboola.local/v1/tasks/api.rollback.sinkVersion/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "status": "processing", + "isFinished": false, + "createdAt": "%s" +} diff --git a/test/stream/api/sink/create-015-disable-rollback/008-rollback-version/request.json b/test/stream/api/sink/create-015-disable-rollback/008-rollback-version/request.json new file mode 100644 index 0000000000..dea63a9c5d --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/008-rollback-version/request.json @@ -0,0 +1,8 @@ +{ + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/versions/1/rollback", + "method": "PUT", + "headers": { + "Content-Type": "application/json", + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/009-poll-rollback/expected-http-code b/test/stream/api/sink/create-015-disable-rollback/009-poll-rollback/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/009-poll-rollback/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/stream/api/sink/create-015-disable-rollback/009-poll-rollback/expected-response.json b/test/stream/api/sink/create-015-disable-rollback/009-poll-rollback/expected-response.json new file mode 100644 index 0000000000..3ff7ad8f2b --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/009-poll-rollback/expected-response.json @@ -0,0 +1,18 @@ +{ + "taskId": "api.rollback.sinkVersion/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "type": "api.rollback.sinkVersion", + "url": "https://stream.keboola.local/v1/tasks/api.rollback.sinkVersion/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "status": "success", + "isFinished": true, + "createdAt": "%s", + "finishedAt": "%s", + "duration": %d, + "result": "Sink version was rolled back successfully.", + "outputs": { + "url": "https://stream.keboola.local/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink", + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source", + "sinkId": "my-sink" + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/009-poll-rollback/request.json b/test/stream/api/sink/create-015-disable-rollback/009-poll-rollback/request.json new file mode 100644 index 0000000000..9ac98e8c1d --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/009-poll-rollback/request.json @@ -0,0 +1,11 @@ +{ + "path": "<<008-rollback-version:response.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "repeat": { + "until": "status != 'processing'", + "timeout": 60 + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/010-get-sink/expected-http-code b/test/stream/api/sink/create-015-disable-rollback/010-get-sink/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/010-get-sink/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/stream/api/sink/create-015-disable-rollback/010-get-sink/expected-response.json b/test/stream/api/sink/create-015-disable-rollback/010-get-sink/expected-response.json new file mode 100644 index 0000000000..7d977b373e --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/010-get-sink/expected-response.json @@ -0,0 +1,59 @@ +{ + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source", + "sinkId": "my-sink", + "type": "table", + "name": "My Sink", + "description": "", + "table": { + "type": "keboola", + "tableId": "in.c-my-bucket.my-table", + "mapping": { + "columns": [ + { + "type": "uuid", + "name": "id" + }, + { + "type": "body", + "name": "body" + } + ] + } + }, + "version": { + "number": 3, + "hash": "%s", + "description": "Rollback to version \"1\".", + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + } + }, + "created": { + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + } + }, + "disabled": { + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + }, + "reason": "API" + } +} diff --git a/test/stream/api/sink/create-015-disable-rollback/010-get-sink/request.json b/test/stream/api/sink/create-015-disable-rollback/010-get-sink/request.json new file mode 100644 index 0000000000..aceeb4f2f1 --- /dev/null +++ b/test/stream/api/sink/create-015-disable-rollback/010-get-sink/request.json @@ -0,0 +1,7 @@ +{ + "path": "<<004-poll-sink:response.outputs.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + } +} diff --git a/test/stream/api/sink/create-015-path-template/001-create-source/request.json b/test/stream/api/sink/create-015-path-template/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/create-015-path-template/001-create-source/request.json +++ b/test/stream/api/sink/create-015-path-template/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/create-015-path-template/003-create-sink/request.json b/test/stream/api/sink/create-015-path-template/003-create-sink/request.json index 05ea86056c..450bcc9421 100644 --- a/test/stream/api/sink/create-015-path-template/003-create-sink/request.json +++ b/test/stream/api/sink/create-015-path-template/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/delete-001-ok/001-create-source/request.json b/test/stream/api/sink/delete-001-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/delete-001-ok/001-create-source/request.json +++ b/test/stream/api/sink/delete-001-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/delete-001-ok/003-create-sink/request.json b/test/stream/api/sink/delete-001-ok/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/delete-001-ok/003-create-sink/request.json +++ b/test/stream/api/sink/delete-001-ok/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/delete-002-not-found-404/002-create-source/request.json b/test/stream/api/sink/delete-002-not-found-404/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/delete-002-not-found-404/002-create-source/request.json +++ b/test/stream/api/sink/delete-002-not-found-404/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/disable-001-not-found-404/002-create-source/request.json b/test/stream/api/sink/disable-001-not-found-404/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/disable-001-not-found-404/002-create-source/request.json +++ b/test/stream/api/sink/disable-001-not-found-404/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/enable-001-not-found-404/002-create-source/request.json b/test/stream/api/sink/enable-001-not-found-404/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/enable-001-not-found-404/002-create-source/request.json +++ b/test/stream/api/sink/enable-001-not-found-404/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/get-001-not-found-404/002-create-source/request.json b/test/stream/api/sink/get-001-not-found-404/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/get-001-not-found-404/002-create-source/request.json +++ b/test/stream/api/sink/get-001-not-found-404/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-001-empty-ok/001-create-source/request.json b/test/stream/api/sink/list-001-empty-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/list-001-empty-ok/001-create-source/request.json +++ b/test/stream/api/sink/list-001-empty-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-002-ok/001-create-source/request.json b/test/stream/api/sink/list-002-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/list-002-ok/001-create-source/request.json +++ b/test/stream/api/sink/list-002-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-002-ok/003-create-sink-1/request.json b/test/stream/api/sink/list-002-ok/003-create-sink-1/request.json index 9649c0163f..ddc989f49b 100644 --- a/test/stream/api/sink/list-002-ok/003-create-sink-1/request.json +++ b/test/stream/api/sink/list-002-ok/003-create-sink-1/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-002-ok/003-create-sink-2/request.json b/test/stream/api/sink/list-002-ok/003-create-sink-2/request.json index cf91f0f644..f9dc645dfa 100644 --- a/test/stream/api/sink/list-002-ok/003-create-sink-2/request.json +++ b/test/stream/api/sink/list-002-ok/003-create-sink-2/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-002-ok/003-create-sink-3/request.json b/test/stream/api/sink/list-002-ok/003-create-sink-3/request.json index 0aed5ebb8b..a6f9141f66 100644 --- a/test/stream/api/sink/list-002-ok/003-create-sink-3/request.json +++ b/test/stream/api/sink/list-002-ok/003-create-sink-3/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-002-ok/003-create-sink-4/request.json b/test/stream/api/sink/list-002-ok/003-create-sink-4/request.json index 49cb184a59..e4e54fe9ae 100644 --- a/test/stream/api/sink/list-002-ok/003-create-sink-4/request.json +++ b/test/stream/api/sink/list-002-ok/003-create-sink-4/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-002-ok/003-create-sink-5/request.json b/test/stream/api/sink/list-002-ok/003-create-sink-5/request.json index 1753798d10..4c782e53fb 100644 --- a/test/stream/api/sink/list-002-ok/003-create-sink-5/request.json +++ b/test/stream/api/sink/list-002-ok/003-create-sink-5/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-deleted-empty-ok/001-create-source/request.json b/test/stream/api/sink/list-deleted-empty-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/list-deleted-empty-ok/001-create-source/request.json +++ b/test/stream/api/sink/list-deleted-empty-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-deleted-ok/001-create-source/request.json b/test/stream/api/sink/list-deleted-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/list-deleted-ok/001-create-source/request.json +++ b/test/stream/api/sink/list-deleted-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-deleted-ok/003-create-sink-1/request.json b/test/stream/api/sink/list-deleted-ok/003-create-sink-1/request.json index 9649c0163f..ddc989f49b 100644 --- a/test/stream/api/sink/list-deleted-ok/003-create-sink-1/request.json +++ b/test/stream/api/sink/list-deleted-ok/003-create-sink-1/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-deleted-ok/003-create-sink-2/request.json b/test/stream/api/sink/list-deleted-ok/003-create-sink-2/request.json index cf91f0f644..f9dc645dfa 100644 --- a/test/stream/api/sink/list-deleted-ok/003-create-sink-2/request.json +++ b/test/stream/api/sink/list-deleted-ok/003-create-sink-2/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-deleted-ok/003-create-sink-3/request.json b/test/stream/api/sink/list-deleted-ok/003-create-sink-3/request.json index 0aed5ebb8b..a6f9141f66 100644 --- a/test/stream/api/sink/list-deleted-ok/003-create-sink-3/request.json +++ b/test/stream/api/sink/list-deleted-ok/003-create-sink-3/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-sink-versions-not-found-404/002-create-source/request.json b/test/stream/api/sink/list-sink-versions-not-found-404/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/list-sink-versions-not-found-404/002-create-source/request.json +++ b/test/stream/api/sink/list-sink-versions-not-found-404/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-sink-versions/001-create-source/request.json b/test/stream/api/sink/list-sink-versions/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/list-sink-versions/001-create-source/request.json +++ b/test/stream/api/sink/list-sink-versions/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-sink-versions/003-create-sink/request.json b/test/stream/api/sink/list-sink-versions/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/list-sink-versions/003-create-sink/request.json +++ b/test/stream/api/sink/list-sink-versions/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-sink-versions/005-get-settings/request.json b/test/stream/api/sink/list-sink-versions/005-get-settings/request.json index b0c1a8b531..4bc1741beb 100644 --- a/test/stream/api/sink/list-sink-versions/005-get-settings/request.json +++ b/test/stream/api/sink/list-sink-versions/005-get-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/sink/list-sink-versions/006-patch-settings/request.json b/test/stream/api/sink/list-sink-versions/006-patch-settings/request.json index 65be5c7f1a..97c4acb4f1 100644 --- a/test/stream/api/sink/list-sink-versions/006-patch-settings/request.json +++ b/test/stream/api/sink/list-sink-versions/006-patch-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-sink-versions/008-patch-settings-2-ok/request.json b/test/stream/api/sink/list-sink-versions/008-patch-settings-2-ok/request.json index 65be5c7f1a..97c4acb4f1 100644 --- a/test/stream/api/sink/list-sink-versions/008-patch-settings-2-ok/request.json +++ b/test/stream/api/sink/list-sink-versions/008-patch-settings-2-ok/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/list-sink-versions/010-list-sink-versions/request.json b/test/stream/api/sink/list-sink-versions/010-list-sink-versions/request.json index 08976cad90..8cf19d0de0 100644 --- a/test/stream/api/sink/list-sink-versions/010-list-sink-versions/request.json +++ b/test/stream/api/sink/list-sink-versions/010-list-sink-versions/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/versions", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/versions", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/sink/rollback-version-400/001-create-source/request.json b/test/stream/api/sink/rollback-version-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/rollback-version-400/001-create-source/request.json +++ b/test/stream/api/sink/rollback-version-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/rollback-version-400/003-create-sink/request.json b/test/stream/api/sink/rollback-version-400/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/rollback-version-400/003-create-sink/request.json +++ b/test/stream/api/sink/rollback-version-400/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/rollback-version-400/005-rollback-version/request.json b/test/stream/api/sink/rollback-version-400/005-rollback-version/request.json index d242361e19..8bab5ff70f 100644 --- a/test/stream/api/sink/rollback-version-400/005-rollback-version/request.json +++ b/test/stream/api/sink/rollback-version-400/005-rollback-version/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/versions/asfasf/rollback", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/versions/asfasf/rollback", "method": "PUT", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/sink/rollback-version-404/001-rollback-version/request.json b/test/stream/api/sink/rollback-version-404/001-rollback-version/request.json index 428c563953..dea63a9c5d 100644 --- a/test/stream/api/sink/rollback-version-404/001-rollback-version/request.json +++ b/test/stream/api/sink/rollback-version-404/001-rollback-version/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/versions/1/rollback", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/versions/1/rollback", "method": "PUT", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/rollback-version-404/002-create-source/request.json b/test/stream/api/sink/rollback-version-404/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/rollback-version-404/002-create-source/request.json +++ b/test/stream/api/sink/rollback-version-404/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/rollback-version-404/004-rollback-version/request.json b/test/stream/api/sink/rollback-version-404/004-rollback-version/request.json index 7f8edde80f..0f659841b5 100644 --- a/test/stream/api/sink/rollback-version-404/004-rollback-version/request.json +++ b/test/stream/api/sink/rollback-version-404/004-rollback-version/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/versions/12345/rollback", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/versions/12345/rollback", "method": "PUT", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/sink/rollback-version-404/005-create-sink/request.json b/test/stream/api/sink/rollback-version-404/005-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/rollback-version-404/005-create-sink/request.json +++ b/test/stream/api/sink/rollback-version-404/005-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/rollback-version-404/007-rollback-version/request.json b/test/stream/api/sink/rollback-version-404/007-rollback-version/request.json index 7f8edde80f..0f659841b5 100644 --- a/test/stream/api/sink/rollback-version-404/007-rollback-version/request.json +++ b/test/stream/api/sink/rollback-version-404/007-rollback-version/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/versions/12345/rollback", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/versions/12345/rollback", "method": "PUT", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/sink/rollback-version-ok/001-create-source/request.json b/test/stream/api/sink/rollback-version-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/rollback-version-ok/001-create-source/request.json +++ b/test/stream/api/sink/rollback-version-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/rollback-version-ok/003-create-sink/request.json b/test/stream/api/sink/rollback-version-ok/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/rollback-version-ok/003-create-sink/request.json +++ b/test/stream/api/sink/rollback-version-ok/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/rollback-version-ok/005-patch-settings/request.json b/test/stream/api/sink/rollback-version-ok/005-patch-settings/request.json index 65be5c7f1a..97c4acb4f1 100644 --- a/test/stream/api/sink/rollback-version-ok/005-patch-settings/request.json +++ b/test/stream/api/sink/rollback-version-ok/005-patch-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/rollback-version-ok/007-rollback-version/request.json b/test/stream/api/sink/rollback-version-ok/007-rollback-version/request.json index 428c563953..dea63a9c5d 100644 --- a/test/stream/api/sink/rollback-version-ok/007-rollback-version/request.json +++ b/test/stream/api/sink/rollback-version-ok/007-rollback-version/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/versions/1/rollback", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/versions/1/rollback", "method": "PUT", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/rollback-version-ok/009-list-sink-versions/request.json b/test/stream/api/sink/rollback-version-ok/009-list-sink-versions/request.json index 08976cad90..8cf19d0de0 100644 --- a/test/stream/api/sink/rollback-version-ok/009-list-sink-versions/request.json +++ b/test/stream/api/sink/rollback-version-ok/009-list-sink-versions/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/versions", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/versions", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/sink/settings-001-all/001-create-source/request.json b/test/stream/api/sink/settings-001-all/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/settings-001-all/001-create-source/request.json +++ b/test/stream/api/sink/settings-001-all/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/settings-001-all/003-create-sink/request.json b/test/stream/api/sink/settings-001-all/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/settings-001-all/003-create-sink/request.json +++ b/test/stream/api/sink/settings-001-all/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/settings-001-all/005-get-settings/request.json b/test/stream/api/sink/settings-001-all/005-get-settings/request.json index b0c1a8b531..4bc1741beb 100644 --- a/test/stream/api/sink/settings-001-all/005-get-settings/request.json +++ b/test/stream/api/sink/settings-001-all/005-get-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/sink/settings-001-all/006-patch-settings-1-empty/request.json b/test/stream/api/sink/settings-001-all/006-patch-settings-1-empty/request.json index 1b8cac4643..03ae056186 100644 --- a/test/stream/api/sink/settings-001-all/006-patch-settings-1-empty/request.json +++ b/test/stream/api/sink/settings-001-all/006-patch-settings-1-empty/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/settings-001-all/008-patch-settings-2-ok/request.json b/test/stream/api/sink/settings-001-all/008-patch-settings-2-ok/request.json index 65be5c7f1a..97c4acb4f1 100644 --- a/test/stream/api/sink/settings-001-all/008-patch-settings-2-ok/request.json +++ b/test/stream/api/sink/settings-001-all/008-patch-settings-2-ok/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/settings-001-all/010-patch-settings-3-invalid-value-400/request.json b/test/stream/api/sink/settings-001-all/010-patch-settings-3-invalid-value-400/request.json index 4d4e7e04de..f96811e38c 100644 --- a/test/stream/api/sink/settings-001-all/010-patch-settings-3-invalid-value-400/request.json +++ b/test/stream/api/sink/settings-001-all/010-patch-settings-3-invalid-value-400/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/settings-001-all/011-patch-settings-4-protected-403/request.json b/test/stream/api/sink/settings-001-all/011-patch-settings-4-protected-403/request.json index 92343ed57f..a7123eb1dc 100644 --- a/test/stream/api/sink/settings-001-all/011-patch-settings-4-protected-403/request.json +++ b/test/stream/api/sink/settings-001-all/011-patch-settings-4-protected-403/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/settings-001-all/012-get-settings/request.json b/test/stream/api/sink/settings-001-all/012-get-settings/request.json index b0c1a8b531..4bc1741beb 100644 --- a/test/stream/api/sink/settings-001-all/012-get-settings/request.json +++ b/test/stream/api/sink/settings-001-all/012-get-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/sink/statistics-clear-001-ok/001-create-source/request.json b/test/stream/api/sink/statistics-clear-001-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/statistics-clear-001-ok/001-create-source/request.json +++ b/test/stream/api/sink/statistics-clear-001-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/statistics-clear-001-ok/003-create-sink/request.json b/test/stream/api/sink/statistics-clear-001-ok/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/statistics-clear-001-ok/003-create-sink/request.json +++ b/test/stream/api/sink/statistics-clear-001-ok/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/statistics-clear-002-not-found/002-create-source/request.json b/test/stream/api/sink/statistics-clear-002-not-found/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/statistics-clear-002-not-found/002-create-source/request.json +++ b/test/stream/api/sink/statistics-clear-002-not-found/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/statistics-files-001-ok/001-create-source/request.json b/test/stream/api/sink/statistics-files-001-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/statistics-files-001-ok/001-create-source/request.json +++ b/test/stream/api/sink/statistics-files-001-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/statistics-files-001-ok/003-create-sink/request.json b/test/stream/api/sink/statistics-files-001-ok/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/statistics-files-001-ok/003-create-sink/request.json +++ b/test/stream/api/sink/statistics-files-001-ok/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/statistics-total-001-ok/001-create-source/request.json b/test/stream/api/sink/statistics-total-001-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/statistics-total-001-ok/001-create-source/request.json +++ b/test/stream/api/sink/statistics-total-001-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/statistics-total-001-ok/003-create-sink/request.json b/test/stream/api/sink/statistics-total-001-ok/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/statistics-total-001-ok/003-create-sink/request.json +++ b/test/stream/api/sink/statistics-total-001-ok/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/statistics-total-002-not-found/002-create-source/request.json b/test/stream/api/sink/statistics-total-002-not-found/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/statistics-total-002-not-found/002-create-source/request.json +++ b/test/stream/api/sink/statistics-total-002-not-found/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/statistics-total-003-empty/001-create-source/request.json b/test/stream/api/sink/statistics-total-003-empty/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/statistics-total-003-empty/001-create-source/request.json +++ b/test/stream/api/sink/statistics-total-003-empty/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/statistics-total-003-empty/003-create-sink/request.json b/test/stream/api/sink/statistics-total-003-empty/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/statistics-total-003-empty/003-create-sink/request.json +++ b/test/stream/api/sink/statistics-total-003-empty/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/undelete-not-found-404/002-create-source/request.json b/test/stream/api/sink/undelete-not-found-404/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/undelete-not-found-404/002-create-source/request.json +++ b/test/stream/api/sink/undelete-not-found-404/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/undelete-ok/001-create-source/request.json b/test/stream/api/sink/undelete-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/undelete-ok/001-create-source/request.json +++ b/test/stream/api/sink/undelete-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/undelete-ok/003-create-sink/request.json b/test/stream/api/sink/undelete-ok/003-create-sink/request.json index 289c8451a4..844009d1d7 100644 --- a/test/stream/api/sink/undelete-ok/003-create-sink/request.json +++ b/test/stream/api/sink/undelete-ok/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/undelete-source-deleted/001-create-source/request.json b/test/stream/api/sink/undelete-source-deleted/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/undelete-source-deleted/001-create-source/request.json +++ b/test/stream/api/sink/undelete-source-deleted/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/undelete-source-deleted/003-create-sink/request.json b/test/stream/api/sink/undelete-source-deleted/003-create-sink/request.json index 289c8451a4..844009d1d7 100644 --- a/test/stream/api/sink/undelete-source-deleted/003-create-sink/request.json +++ b/test/stream/api/sink/undelete-source-deleted/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/update-001-ok/001-create-source/request.json b/test/stream/api/sink/update-001-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/update-001-ok/001-create-source/request.json +++ b/test/stream/api/sink/update-001-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/update-001-ok/003-create-sink/request.json b/test/stream/api/sink/update-001-ok/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/update-001-ok/003-create-sink/request.json +++ b/test/stream/api/sink/update-001-ok/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/update-002-name-empty-400/001-create-source/request.json b/test/stream/api/sink/update-002-name-empty-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/update-002-name-empty-400/001-create-source/request.json +++ b/test/stream/api/sink/update-002-name-empty-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/update-002-name-empty-400/003-create-sink/request.json b/test/stream/api/sink/update-002-name-empty-400/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/update-002-name-empty-400/003-create-sink/request.json +++ b/test/stream/api/sink/update-002-name-empty-400/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/update-003-name-max-length-400/001-create-source/request.json b/test/stream/api/sink/update-003-name-max-length-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/update-003-name-max-length-400/001-create-source/request.json +++ b/test/stream/api/sink/update-003-name-max-length-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/update-003-name-max-length-400/003-create-sink/request.json b/test/stream/api/sink/update-003-name-max-length-400/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/update-003-name-max-length-400/003-create-sink/request.json +++ b/test/stream/api/sink/update-003-name-max-length-400/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/update-004-not-found-404/001-create-source/request.json b/test/stream/api/sink/update-004-not-found-404/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/update-004-not-found-404/001-create-source/request.json +++ b/test/stream/api/sink/update-004-not-found-404/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/update-006-invalid-jsonnet-template/001-create-source/request.json b/test/stream/api/sink/update-006-invalid-jsonnet-template/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/update-006-invalid-jsonnet-template/001-create-source/request.json +++ b/test/stream/api/sink/update-006-invalid-jsonnet-template/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/update-006-invalid-jsonnet-template/003-create-sink/request.json b/test/stream/api/sink/update-006-invalid-jsonnet-template/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/update-006-invalid-jsonnet-template/003-create-sink/request.json +++ b/test/stream/api/sink/update-006-invalid-jsonnet-template/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/version-detail-400/001-create-source/request.json b/test/stream/api/sink/version-detail-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/version-detail-400/001-create-source/request.json +++ b/test/stream/api/sink/version-detail-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/version-detail-400/003-create-sink/request.json b/test/stream/api/sink/version-detail-400/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/version-detail-400/003-create-sink/request.json +++ b/test/stream/api/sink/version-detail-400/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/version-detail-404/002-create-source/request.json b/test/stream/api/sink/version-detail-404/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/version-detail-404/002-create-source/request.json +++ b/test/stream/api/sink/version-detail-404/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/version-detail-404/005-create-sink/request.json b/test/stream/api/sink/version-detail-404/005-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/version-detail-404/005-create-sink/request.json +++ b/test/stream/api/sink/version-detail-404/005-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/version-detail-ok/001-create-source/request.json b/test/stream/api/sink/version-detail-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/sink/version-detail-ok/001-create-source/request.json +++ b/test/stream/api/sink/version-detail-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/version-detail-ok/003-create-sink/request.json b/test/stream/api/sink/version-detail-ok/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/sink/version-detail-ok/003-create-sink/request.json +++ b/test/stream/api/sink/version-detail-ok/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/version-detail-ok/005-patch-settings/request.json b/test/stream/api/sink/version-detail-ok/005-patch-settings/request.json index 65be5c7f1a..97c4acb4f1 100644 --- a/test/stream/api/sink/version-detail-ok/005-patch-settings/request.json +++ b/test/stream/api/sink/version-detail-ok/005-patch-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/sink/version-detail-ok/007-version-detail/request.json b/test/stream/api/sink/version-detail-ok/007-version-detail/request.json index 2c4c0d0ff8..3894513b51 100644 --- a/test/stream/api/sink/version-detail-ok/007-version-detail/request.json +++ b/test/stream/api/sink/version-detail-ok/007-version-detail/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks/my-sink/versions/2", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks/my-sink/versions/2", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/aggregation-002-ok/001-create-source-1/request.json b/test/stream/api/source/aggregation-002-ok/001-create-source-1/request.json index 3a983bb08c..c89c9eb245 100644 --- a/test/stream/api/source/aggregation-002-ok/001-create-source-1/request.json +++ b/test/stream/api/source/aggregation-002-ok/001-create-source-1/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/aggregation-002-ok/001-create-source-2/request.json b/test/stream/api/source/aggregation-002-ok/001-create-source-2/request.json index cff13daa57..e736fd1c0f 100644 --- a/test/stream/api/source/aggregation-002-ok/001-create-source-2/request.json +++ b/test/stream/api/source/aggregation-002-ok/001-create-source-2/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/aggregation-002-ok/001-create-source-3/request.json b/test/stream/api/source/aggregation-002-ok/001-create-source-3/request.json index f291f289d1..2b547a5c15 100644 --- a/test/stream/api/source/aggregation-002-ok/001-create-source-3/request.json +++ b/test/stream/api/source/aggregation-002-ok/001-create-source-3/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/aggregation-002-ok/001-create-source-4/request.json b/test/stream/api/source/aggregation-002-ok/001-create-source-4/request.json index 4d7b20412e..a356c0ebf7 100644 --- a/test/stream/api/source/aggregation-002-ok/001-create-source-4/request.json +++ b/test/stream/api/source/aggregation-002-ok/001-create-source-4/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/aggregation-002-ok/001-create-source-5/request.json b/test/stream/api/source/aggregation-002-ok/001-create-source-5/request.json index 1fd574b8e0..914472cede 100644 --- a/test/stream/api/source/aggregation-002-ok/001-create-source-5/request.json +++ b/test/stream/api/source/aggregation-002-ok/001-create-source-5/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/aggregation-002-ok/003-create-sink-1/request.json b/test/stream/api/source/aggregation-002-ok/003-create-sink-1/request.json index 13b3460329..50ef4d70d4 100644 --- a/test/stream/api/source/aggregation-002-ok/003-create-sink-1/request.json +++ b/test/stream/api/source/aggregation-002-ok/003-create-sink-1/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source-1/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source-1/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/aggregation-002-ok/004-create-sink-2/request.json b/test/stream/api/source/aggregation-002-ok/004-create-sink-2/request.json index c8dc29abe8..7bbe3f1f71 100644 --- a/test/stream/api/source/aggregation-002-ok/004-create-sink-2/request.json +++ b/test/stream/api/source/aggregation-002-ok/004-create-sink-2/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source-1/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source-1/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-001-minimal-and-get/001-create-source/request.json b/test/stream/api/source/create-001-minimal-and-get/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/create-001-minimal-and-get/001-create-source/request.json +++ b/test/stream/api/source/create-001-minimal-and-get/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-002-with-id-and-get/001-create-source/request.json b/test/stream/api/source/create-002-with-id-and-get/001-create-source/request.json index 0fcebca8e0..4271635830 100644 --- a/test/stream/api/source/create-002-with-id-and-get/001-create-source/request.json +++ b/test/stream/api/source/create-002-with-id-and-get/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-003-weird-id-and-get/001-create-source/request.json b/test/stream/api/source/create-003-weird-id-and-get/001-create-source/request.json index 637aa6d129..edf34a1139 100644 --- a/test/stream/api/source/create-003-weird-id-and-get/001-create-source/request.json +++ b/test/stream/api/source/create-003-weird-id-and-get/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-004-with-description-and-get/001-create-source/request.json b/test/stream/api/source/create-004-with-description-and-get/001-create-source/request.json index bacfddec0e..7a19aa0745 100644 --- a/test/stream/api/source/create-004-with-description-and-get/001-create-source/request.json +++ b/test/stream/api/source/create-004-with-description-and-get/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-005-invalid-type-400/001-create-source/request.json b/test/stream/api/source/create-005-invalid-type-400/001-create-source/request.json index 87ec890396..97adef97e2 100644 --- a/test/stream/api/source/create-005-invalid-type-400/001-create-source/request.json +++ b/test/stream/api/source/create-005-invalid-type-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-006-id-empty-400/001-create-source/request.json b/test/stream/api/source/create-006-id-empty-400/001-create-source/request.json index bdc9ffafff..4471510bff 100644 --- a/test/stream/api/source/create-006-id-empty-400/001-create-source/request.json +++ b/test/stream/api/source/create-006-id-empty-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-007-id-max-length-400/001-create-source/request.json b/test/stream/api/source/create-007-id-max-length-400/001-create-source/request.json index d2c1f22e72..6dae1fe507 100644 --- a/test/stream/api/source/create-007-id-max-length-400/001-create-source/request.json +++ b/test/stream/api/source/create-007-id-max-length-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-008-name-empty-400/001-create-source/request.json b/test/stream/api/source/create-008-name-empty-400/001-create-source/request.json index 960b8b4b03..ca307beb84 100644 --- a/test/stream/api/source/create-008-name-empty-400/001-create-source/request.json +++ b/test/stream/api/source/create-008-name-empty-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-009-name-max-length-400/001-create-source/request.json b/test/stream/api/source/create-009-name-max-length-400/001-create-source/request.json index 96b6608153..bae8688ca0 100644 --- a/test/stream/api/source/create-009-name-max-length-400/001-create-source/request.json +++ b/test/stream/api/source/create-009-name-max-length-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-010-missing-storage-token-400/001-create-source/request.json b/test/stream/api/source/create-010-missing-storage-token-400/001-create-source/request.json index 8d1408d030..e126427da8 100644 --- a/test/stream/api/source/create-010-missing-storage-token-400/001-create-source/request.json +++ b/test/stream/api/source/create-010-missing-storage-token-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json" diff --git a/test/stream/api/source/create-011-exists-409/001-create-source/request.json b/test/stream/api/source/create-011-exists-409/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/create-011-exists-409/001-create-source/request.json +++ b/test/stream/api/source/create-011-exists-409/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-011-exists-409/003-create-source/request.json b/test/stream/api/source/create-011-exists-409/003-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/create-011-exists-409/003-create-source/request.json +++ b/test/stream/api/source/create-011-exists-409/003-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-012-disable-enable/001-create-source/request.json b/test/stream/api/source/create-012-disable-enable/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/create-012-disable-enable/001-create-source/request.json +++ b/test/stream/api/source/create-012-disable-enable/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/create-013-disable-rollback/001-create-source/expected-http-code b/test/stream/api/source/create-013-disable-rollback/001-create-source/expected-http-code new file mode 100644 index 0000000000..8f897c857d --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/001-create-source/expected-http-code @@ -0,0 +1 @@ +202 diff --git a/test/stream/api/source/create-013-disable-rollback/001-create-source/expected-response.json b/test/stream/api/source/create-013-disable-rollback/001-create-source/expected-response.json new file mode 100644 index 0000000000..1e07d5213f --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/001-create-source/expected-response.json @@ -0,0 +1,8 @@ +{ + "taskId": "api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "type": "api.create.source", + "url": "https://stream.keboola.local/v1/tasks/api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "status": "processing", + "isFinished": false, + "createdAt": "%s" +} diff --git a/test/stream/api/source/create-013-disable-rollback/001-create-source/request.json b/test/stream/api/source/create-013-disable-rollback/001-create-source/request.json new file mode 100644 index 0000000000..1104311603 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/001-create-source/request.json @@ -0,0 +1,12 @@ +{ + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", + "method": "POST", + "headers": { + "Content-Type": "application/json", + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "body": { + "name": "My Source", + "type": "http" + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/002-poll-source/expected-http-code b/test/stream/api/source/create-013-disable-rollback/002-poll-source/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/002-poll-source/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/stream/api/source/create-013-disable-rollback/002-poll-source/expected-response.json b/test/stream/api/source/create-013-disable-rollback/002-poll-source/expected-response.json new file mode 100644 index 0000000000..888d20330b --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/002-poll-source/expected-response.json @@ -0,0 +1,17 @@ +{ + "taskId": "api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "type": "api.create.source", + "url": "https://stream.keboola.local/v1/tasks/api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "status": "success", + "isFinished": true, + "createdAt": "%s", + "finishedAt": "%s", + "duration": %d, + "result": "Source has been created successfully.", + "outputs": { + "url": "https://stream.keboola.local/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source", + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source" + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/002-poll-source/request.json b/test/stream/api/source/create-013-disable-rollback/002-poll-source/request.json new file mode 100644 index 0000000000..59eb032876 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/002-poll-source/request.json @@ -0,0 +1,11 @@ +{ + "path": "<<001-create-source:response.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "repeat": { + "until": "status != 'processing'", + "timeout": 60 + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/003-disable-source/expected-http-code b/test/stream/api/source/create-013-disable-rollback/003-disable-source/expected-http-code new file mode 100644 index 0000000000..8f897c857d --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/003-disable-source/expected-http-code @@ -0,0 +1 @@ +202 diff --git a/test/stream/api/source/create-013-disable-rollback/003-disable-source/expected-response.json b/test/stream/api/source/create-013-disable-rollback/003-disable-source/expected-response.json new file mode 100644 index 0000000000..5050cb6eb0 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/003-disable-source/expected-response.json @@ -0,0 +1,8 @@ +{ + "taskId": "api.disable.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "type": "api.disable.source", + "url": "https://stream.keboola.local/v1/tasks/api.disable.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "status": "processing", + "isFinished": false, + "createdAt": "%s" +} diff --git a/test/stream/api/source/create-013-disable-rollback/003-disable-source/request.json b/test/stream/api/source/create-013-disable-rollback/003-disable-source/request.json new file mode 100644 index 0000000000..73835e8d64 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/003-disable-source/request.json @@ -0,0 +1,7 @@ +{ + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/disable", + "method": "PUT", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/004-poll-source/expected-http-code b/test/stream/api/source/create-013-disable-rollback/004-poll-source/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/004-poll-source/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/stream/api/source/create-013-disable-rollback/004-poll-source/expected-response.json b/test/stream/api/source/create-013-disable-rollback/004-poll-source/expected-response.json new file mode 100644 index 0000000000..1233d8216e --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/004-poll-source/expected-response.json @@ -0,0 +1,17 @@ +{ + "taskId": "api.disable.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "type": "api.disable.source", + "url": "https://stream.keboola.local/v1/tasks/api.disable.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "status": "success", + "isFinished": true, + "createdAt": "%s", + "finishedAt": "%s", + "duration": %d, + "result": "Source has been disabled successfully.", + "outputs": { + "url": "https://stream.keboola.local/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source", + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source" + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/004-poll-source/request.json b/test/stream/api/source/create-013-disable-rollback/004-poll-source/request.json new file mode 100644 index 0000000000..6c82b7da86 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/004-poll-source/request.json @@ -0,0 +1,11 @@ +{ + "path": "<<003-disable-source:response.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "repeat": { + "until": "status != 'processing'", + "timeout": 60 + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/005-get-source/expected-http-code b/test/stream/api/source/create-013-disable-rollback/005-get-source/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/005-get-source/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/stream/api/source/create-013-disable-rollback/005-get-source/expected-response.json b/test/stream/api/source/create-013-disable-rollback/005-get-source/expected-response.json new file mode 100644 index 0000000000..1fe06da9e5 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/005-get-source/expected-response.json @@ -0,0 +1,45 @@ +{ + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source", + "type": "http", + "name": "My Source", + "description": "", + "http": { + "url": "https://stream-in.keboola.local/stream/%%TEST_KBC_PROJECT_ID%%/my-source/%s" + }, + "version": { + "number": 2, + "hash": "%s", + "description": "Disabled.", + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + } + }, + "created": { + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + } + }, + "disabled": { + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + }, + "reason": "API" + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/005-get-source/request.json b/test/stream/api/source/create-013-disable-rollback/005-get-source/request.json new file mode 100644 index 0000000000..f12d5548b6 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/005-get-source/request.json @@ -0,0 +1,7 @@ +{ + "path": "<<004-poll-source:response.outputs.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/006-rollback-version/expected-http-code b/test/stream/api/source/create-013-disable-rollback/006-rollback-version/expected-http-code new file mode 100644 index 0000000000..8f897c857d --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/006-rollback-version/expected-http-code @@ -0,0 +1 @@ +202 diff --git a/test/stream/api/source/create-013-disable-rollback/006-rollback-version/expected-response.json b/test/stream/api/source/create-013-disable-rollback/006-rollback-version/expected-response.json new file mode 100644 index 0000000000..ea27c6c7c4 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/006-rollback-version/expected-response.json @@ -0,0 +1,8 @@ +{ + "taskId": "api.rollback.sourceVersion/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "type": "api.rollback.sourceVersion", + "url": "https://stream.keboola.local/v1/tasks/api.rollback.sourceVersion/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "status": "processing", + "isFinished": false, + "createdAt": "%s" +} diff --git a/test/stream/api/source/create-013-disable-rollback/006-rollback-version/request.json b/test/stream/api/source/create-013-disable-rollback/006-rollback-version/request.json new file mode 100644 index 0000000000..4f77f84c51 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/006-rollback-version/request.json @@ -0,0 +1,8 @@ +{ + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions/1/rollback", + "method": "PUT", + "headers": { + "Content-Type": "application/json", + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/007-poll-rollback/expected-http-code b/test/stream/api/source/create-013-disable-rollback/007-poll-rollback/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/007-poll-rollback/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/stream/api/source/create-013-disable-rollback/007-poll-rollback/expected-response.json b/test/stream/api/source/create-013-disable-rollback/007-poll-rollback/expected-response.json new file mode 100644 index 0000000000..02b4cdd585 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/007-poll-rollback/expected-response.json @@ -0,0 +1,17 @@ +{ + "taskId": "api.rollback.sourceVersion/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "type": "api.rollback.sourceVersion", + "url": "https://stream.keboola.local/v1/tasks/api.rollback.sourceVersion/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s", + "status": "success", + "isFinished": true, + "createdAt": "%s", + "finishedAt": "%s", + "duration": %d, + "result": "Source version was rolled back successfully.", + "outputs": { + "url": "https://stream.keboola.local/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source", + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source" + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/007-poll-rollback/request.json b/test/stream/api/source/create-013-disable-rollback/007-poll-rollback/request.json new file mode 100644 index 0000000000..acae79afe3 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/007-poll-rollback/request.json @@ -0,0 +1,11 @@ +{ + "path": "<<006-rollback-version:response.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "repeat": { + "until": "status != 'processing'", + "timeout": 60 + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/008-get-source/expected-http-code b/test/stream/api/source/create-013-disable-rollback/008-get-source/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/008-get-source/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/stream/api/source/create-013-disable-rollback/008-get-source/expected-response.json b/test/stream/api/source/create-013-disable-rollback/008-get-source/expected-response.json new file mode 100644 index 0000000000..beb91af9c7 --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/008-get-source/expected-response.json @@ -0,0 +1,45 @@ +{ + "projectId": %%TEST_KBC_PROJECT_ID%%, + "branchId": %%TEST_DEFAULT_BRANCH_ID%%, + "sourceId": "my-source", + "type": "http", + "name": "My Source", + "description": "", + "http": { + "url": "https://stream-in.keboola.local/stream/%%TEST_KBC_PROJECT_ID%%/my-source/%s" + }, + "version": { + "number": 3, + "hash": "%s", + "description": "Rollback to version \"1\".", + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + } + }, + "created": { + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + } + }, + "disabled": { + "at": "%s", + "by": { + "type": "user", + "tokenId": "%s", + "tokenDesc": "%s", + "userId": "%s", + "userName": "%s" + }, + "reason": "API" + } +} diff --git a/test/stream/api/source/create-013-disable-rollback/008-get-source/request.json b/test/stream/api/source/create-013-disable-rollback/008-get-source/request.json new file mode 100644 index 0000000000..31fb6bb97f --- /dev/null +++ b/test/stream/api/source/create-013-disable-rollback/008-get-source/request.json @@ -0,0 +1,7 @@ +{ + "path": "<<002-poll-source:response.outputs.url>>", + "method": "GET", + "headers": { + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + } +} diff --git a/test/stream/api/source/delete-001-ok/001-create-source/request.json b/test/stream/api/source/delete-001-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/delete-001-ok/001-create-source/request.json +++ b/test/stream/api/source/delete-001-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-002-ok/001-create-source-1/request.json b/test/stream/api/source/list-002-ok/001-create-source-1/request.json index 3a983bb08c..c89c9eb245 100644 --- a/test/stream/api/source/list-002-ok/001-create-source-1/request.json +++ b/test/stream/api/source/list-002-ok/001-create-source-1/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-002-ok/001-create-source-2/request.json b/test/stream/api/source/list-002-ok/001-create-source-2/request.json index cff13daa57..e736fd1c0f 100644 --- a/test/stream/api/source/list-002-ok/001-create-source-2/request.json +++ b/test/stream/api/source/list-002-ok/001-create-source-2/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-002-ok/001-create-source-3/request.json b/test/stream/api/source/list-002-ok/001-create-source-3/request.json index f291f289d1..2b547a5c15 100644 --- a/test/stream/api/source/list-002-ok/001-create-source-3/request.json +++ b/test/stream/api/source/list-002-ok/001-create-source-3/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-002-ok/001-create-source-4/request.json b/test/stream/api/source/list-002-ok/001-create-source-4/request.json index 4d7b20412e..a356c0ebf7 100644 --- a/test/stream/api/source/list-002-ok/001-create-source-4/request.json +++ b/test/stream/api/source/list-002-ok/001-create-source-4/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-002-ok/001-create-source-5/request.json b/test/stream/api/source/list-002-ok/001-create-source-5/request.json index 1fd574b8e0..914472cede 100644 --- a/test/stream/api/source/list-002-ok/001-create-source-5/request.json +++ b/test/stream/api/source/list-002-ok/001-create-source-5/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-deleted-ok/001-create-source-1/request.json b/test/stream/api/source/list-deleted-ok/001-create-source-1/request.json index 3a983bb08c..c89c9eb245 100644 --- a/test/stream/api/source/list-deleted-ok/001-create-source-1/request.json +++ b/test/stream/api/source/list-deleted-ok/001-create-source-1/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-deleted-ok/001-create-source-2/request.json b/test/stream/api/source/list-deleted-ok/001-create-source-2/request.json index cff13daa57..e736fd1c0f 100644 --- a/test/stream/api/source/list-deleted-ok/001-create-source-2/request.json +++ b/test/stream/api/source/list-deleted-ok/001-create-source-2/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-deleted-ok/001-create-source-3/request.json b/test/stream/api/source/list-deleted-ok/001-create-source-3/request.json index f291f289d1..2b547a5c15 100644 --- a/test/stream/api/source/list-deleted-ok/001-create-source-3/request.json +++ b/test/stream/api/source/list-deleted-ok/001-create-source-3/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-source-versions/001-create-source/request.json b/test/stream/api/source/list-source-versions/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/list-source-versions/001-create-source/request.json +++ b/test/stream/api/source/list-source-versions/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-source-versions/003-patch-settings/request.json b/test/stream/api/source/list-source-versions/003-patch-settings/request.json index 87cc1626d5..7dfc1ce8bc 100644 --- a/test/stream/api/source/list-source-versions/003-patch-settings/request.json +++ b/test/stream/api/source/list-source-versions/003-patch-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-source-versions/004-patch-settings/request.json b/test/stream/api/source/list-source-versions/004-patch-settings/request.json index 87cc1626d5..7dfc1ce8bc 100644 --- a/test/stream/api/source/list-source-versions/004-patch-settings/request.json +++ b/test/stream/api/source/list-source-versions/004-patch-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/list-source-versions/007-list-afterId/request.json b/test/stream/api/source/list-source-versions/007-list-afterId/request.json index cf71a59173..17a05a83fc 100644 --- a/test/stream/api/source/list-source-versions/007-list-afterId/request.json +++ b/test/stream/api/source/list-source-versions/007-list-afterId/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions?afterId=2", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions?afterId=2", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/list-source-versions/010-list-source-versions/request.json b/test/stream/api/source/list-source-versions/010-list-source-versions/request.json index 3e28184037..9b92186eec 100644 --- a/test/stream/api/source/list-source-versions/010-list-source-versions/request.json +++ b/test/stream/api/source/list-source-versions/010-list-source-versions/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/rollback-version-400/001-create-source/request.json b/test/stream/api/source/rollback-version-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/rollback-version-400/001-create-source/request.json +++ b/test/stream/api/source/rollback-version-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/rollback-version-400/003-rollback-version/request.json b/test/stream/api/source/rollback-version-400/003-rollback-version/request.json index 02e58ed1a2..79675ed68e 100644 --- a/test/stream/api/source/rollback-version-400/003-rollback-version/request.json +++ b/test/stream/api/source/rollback-version-400/003-rollback-version/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions/asfasf/rollback", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions/asfasf/rollback", "method": "PUT", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/rollback-version-404/001-rollback-version/request.json b/test/stream/api/source/rollback-version-404/001-rollback-version/request.json index a437bf172b..4f77f84c51 100644 --- a/test/stream/api/source/rollback-version-404/001-rollback-version/request.json +++ b/test/stream/api/source/rollback-version-404/001-rollback-version/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions/1/rollback", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions/1/rollback", "method": "PUT", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/rollback-version-404/002-create-source/request.json b/test/stream/api/source/rollback-version-404/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/rollback-version-404/002-create-source/request.json +++ b/test/stream/api/source/rollback-version-404/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/rollback-version-404/004-rollback-version/request.json b/test/stream/api/source/rollback-version-404/004-rollback-version/request.json index a0e2275931..67463f8d08 100644 --- a/test/stream/api/source/rollback-version-404/004-rollback-version/request.json +++ b/test/stream/api/source/rollback-version-404/004-rollback-version/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions/12345/rollback", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions/12345/rollback", "method": "PUT", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/rollback-version-ok/001-create-source/request.json b/test/stream/api/source/rollback-version-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/rollback-version-ok/001-create-source/request.json +++ b/test/stream/api/source/rollback-version-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/rollback-version-ok/003-patch-settings/request.json b/test/stream/api/source/rollback-version-ok/003-patch-settings/request.json index a1391a2ea9..c8e29a9ef7 100644 --- a/test/stream/api/source/rollback-version-ok/003-patch-settings/request.json +++ b/test/stream/api/source/rollback-version-ok/003-patch-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/rollback-version-ok/005-rollback-version/request.json b/test/stream/api/source/rollback-version-ok/005-rollback-version/request.json index a437bf172b..4f77f84c51 100644 --- a/test/stream/api/source/rollback-version-ok/005-rollback-version/request.json +++ b/test/stream/api/source/rollback-version-ok/005-rollback-version/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions/1/rollback", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions/1/rollback", "method": "PUT", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/rollback-version-ok/007-list-source-versions/request.json b/test/stream/api/source/rollback-version-ok/007-list-source-versions/request.json index 3e28184037..9b92186eec 100644 --- a/test/stream/api/source/rollback-version-ok/007-list-source-versions/request.json +++ b/test/stream/api/source/rollback-version-ok/007-list-source-versions/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/settings-001-all/001-create-source/request.json b/test/stream/api/source/settings-001-all/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/settings-001-all/001-create-source/request.json +++ b/test/stream/api/source/settings-001-all/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/settings-001-all/003-get-settings/request.json b/test/stream/api/source/settings-001-all/003-get-settings/request.json index 9af1e766aa..ecc2133b4f 100644 --- a/test/stream/api/source/settings-001-all/003-get-settings/request.json +++ b/test/stream/api/source/settings-001-all/003-get-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/settings", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/settings-001-all/004-patch-settings-1-empty/request.json b/test/stream/api/source/settings-001-all/004-patch-settings-1-empty/request.json index 608b612920..4e34150eab 100644 --- a/test/stream/api/source/settings-001-all/004-patch-settings-1-empty/request.json +++ b/test/stream/api/source/settings-001-all/004-patch-settings-1-empty/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/settings-001-all/006-patch-settings-2-ok/request.json b/test/stream/api/source/settings-001-all/006-patch-settings-2-ok/request.json index a1391a2ea9..c8e29a9ef7 100644 --- a/test/stream/api/source/settings-001-all/006-patch-settings-2-ok/request.json +++ b/test/stream/api/source/settings-001-all/006-patch-settings-2-ok/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/settings-001-all/008-patch-settings-3-invalid-value-400/request.json b/test/stream/api/source/settings-001-all/008-patch-settings-3-invalid-value-400/request.json index abd10002ce..26398b52c0 100644 --- a/test/stream/api/source/settings-001-all/008-patch-settings-3-invalid-value-400/request.json +++ b/test/stream/api/source/settings-001-all/008-patch-settings-3-invalid-value-400/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/settings-001-all/009-patch-settings-4-protected-403/request.json b/test/stream/api/source/settings-001-all/009-patch-settings-4-protected-403/request.json index 9b4eb33084..c7f7138212 100644 --- a/test/stream/api/source/settings-001-all/009-patch-settings-4-protected-403/request.json +++ b/test/stream/api/source/settings-001-all/009-patch-settings-4-protected-403/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/settings-001-all/010-get-settings/request.json b/test/stream/api/source/settings-001-all/010-get-settings/request.json index 9af1e766aa..ecc2133b4f 100644 --- a/test/stream/api/source/settings-001-all/010-get-settings/request.json +++ b/test/stream/api/source/settings-001-all/010-get-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/settings", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/statistics-clear-001-ok/001-create-source/request.json b/test/stream/api/source/statistics-clear-001-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/statistics-clear-001-ok/001-create-source/request.json +++ b/test/stream/api/source/statistics-clear-001-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/statistics-clear-001-ok/003-create-sink/request.json b/test/stream/api/source/statistics-clear-001-ok/003-create-sink/request.json index e2f4abb0ef..66d95dcc74 100644 --- a/test/stream/api/source/statistics-clear-001-ok/003-create-sink/request.json +++ b/test/stream/api/source/statistics-clear-001-ok/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/test-mapping/001-create-source/request.json b/test/stream/api/source/test-mapping/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/test-mapping/001-create-source/request.json +++ b/test/stream/api/source/test-mapping/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/test-mapping/003-create-sink/request.json b/test/stream/api/source/test-mapping/003-create-sink/request.json index e5a4dcc9b2..c4c65d1c6e 100644 --- a/test/stream/api/source/test-mapping/003-create-sink/request.json +++ b/test/stream/api/source/test-mapping/003-create-sink/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/sinks", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/undelete-ok/001-create-source/request.json b/test/stream/api/source/undelete-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/undelete-ok/001-create-source/request.json +++ b/test/stream/api/source/undelete-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/update-001-ok/001-create-source/request.json b/test/stream/api/source/update-001-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/update-001-ok/001-create-source/request.json +++ b/test/stream/api/source/update-001-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/update-002-name-empty-400/001-create-source/request.json b/test/stream/api/source/update-002-name-empty-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/update-002-name-empty-400/001-create-source/request.json +++ b/test/stream/api/source/update-002-name-empty-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/update-003-name-max-length-400/001-create-source/request.json b/test/stream/api/source/update-003-name-max-length-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/update-003-name-max-length-400/001-create-source/request.json +++ b/test/stream/api/source/update-003-name-max-length-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/version-detail-400/001-create-source/request.json b/test/stream/api/source/version-detail-400/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/version-detail-400/001-create-source/request.json +++ b/test/stream/api/source/version-detail-400/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/version-detail-400/003-version-detail/request.json b/test/stream/api/source/version-detail-400/003-version-detail/request.json index 507dee9e34..af85d0dee1 100644 --- a/test/stream/api/source/version-detail-400/003-version-detail/request.json +++ b/test/stream/api/source/version-detail-400/003-version-detail/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions/2dsad5", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions/2dsad5", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/version-detail-404/001-version-detail/request.json b/test/stream/api/source/version-detail-404/001-version-detail/request.json index 00fdae1117..d6df12c3da 100644 --- a/test/stream/api/source/version-detail-404/001-version-detail/request.json +++ b/test/stream/api/source/version-detail-404/001-version-detail/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions/25", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions/25", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/version-detail-404/002-create-source/request.json b/test/stream/api/source/version-detail-404/002-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/version-detail-404/002-create-source/request.json +++ b/test/stream/api/source/version-detail-404/002-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/version-detail-404/004-version-detail/request.json b/test/stream/api/source/version-detail-404/004-version-detail/request.json index 00fdae1117..d6df12c3da 100644 --- a/test/stream/api/source/version-detail-404/004-version-detail/request.json +++ b/test/stream/api/source/version-detail-404/004-version-detail/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions/25", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions/25", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/stream/api/source/version-detail-ok/001-create-source/request.json b/test/stream/api/source/version-detail-ok/001-create-source/request.json index 74ea7dc6c0..1104311603 100644 --- a/test/stream/api/source/version-detail-ok/001-create-source/request.json +++ b/test/stream/api/source/version-detail-ok/001-create-source/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources", "method": "POST", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/version-detail-ok/003-patch-settings/request.json b/test/stream/api/source/version-detail-ok/003-patch-settings/request.json index a1391a2ea9..c8e29a9ef7 100644 --- a/test/stream/api/source/version-detail-ok/003-patch-settings/request.json +++ b/test/stream/api/source/version-detail-ok/003-patch-settings/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/settings", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/settings", "method": "PATCH", "headers": { "Content-Type": "application/json", diff --git a/test/stream/api/source/version-detail-ok/005-version-detail/request.json b/test/stream/api/source/version-detail-ok/005-version-detail/request.json index 365c99b0a7..97640405c6 100644 --- a/test/stream/api/source/version-detail-ok/005-version-detail/request.json +++ b/test/stream/api/source/version-detail-ok/005-version-detail/request.json @@ -1,5 +1,5 @@ { - "path": "/v1/branches/default/sources/my-source/versions/2", + "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/versions/2", "method": "GET", "headers": { "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" diff --git a/test/templates/api/projects/instance-delete/008-list-instances/expected-http-code b/test/templates/api/projects/instance-delete/008-list-instances/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/templates/api/projects/instance-delete/008-list-instances/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/templates/api/projects/instance-delete/005-list-instances/expected-response.json b/test/templates/api/projects/instance-delete/008-list-instances/expected-response.json similarity index 100% rename from test/templates/api/projects/instance-delete/005-list-instances/expected-response.json rename to test/templates/api/projects/instance-delete/008-list-instances/expected-response.json diff --git a/test/templates/api/projects/instance-delete/005-list-instances/request.json b/test/templates/api/projects/instance-delete/008-list-instances/request.json similarity index 100% rename from test/templates/api/projects/instance-delete/005-list-instances/request.json rename to test/templates/api/projects/instance-delete/008-list-instances/request.json