-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
095d30e
commit d635c2c
Showing
7 changed files
with
412 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
airbyte-cdk/bulk/core/load/src/test/kotlin/io/airbyte/cdk/command/MockCatalogFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2024 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.cdk.command | ||
|
||
import io.micronaut.context.annotation.Factory | ||
import io.micronaut.context.annotation.Replaces | ||
import io.micronaut.context.annotation.Requires | ||
import jakarta.inject.Named | ||
import jakarta.inject.Singleton | ||
|
||
@Factory | ||
@Replaces(factory = DestinationCatalogFactory::class) | ||
@Requires(env = ["test"]) | ||
class MockCatalogFactory : DestinationCatalogFactory { | ||
companion object { | ||
val stream1 = DestinationStream(DestinationStream.Descriptor("test", "stream1")) | ||
val stream2 = DestinationStream(DestinationStream.Descriptor("test", "stream2")) | ||
} | ||
|
||
@Singleton | ||
@Named("mockCatalog") | ||
override fun make(): DestinationCatalog { | ||
return DestinationCatalog(streams = listOf(stream1, stream2)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.