-
Notifications
You must be signed in to change notification settings - Fork 12
Fix tests #533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests #533
Changes from 2 commits
d802a3c
0cc205d
76ad24b
0d396cb
588d2c8
c015106
b55a7f3
d56c96a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,7 +147,7 @@ export class RestateTestEnvironment { | |
public static async start( | ||
mountServicesFn: (server: restate.RestateEndpoint) => void, | ||
restateContainerFactory: () => GenericContainer = () => | ||
new GenericContainer("docker.io/restatedev/restate:latest") | ||
new RestateGenericContainer() | ||
): Promise<RestateTestEnvironment> { | ||
const startedRestateHttpServer = await prepareRestateEndpoint( | ||
mountServicesFn | ||
|
@@ -167,6 +167,11 @@ export class RestateTestEnvironment { | |
export type TypedState = Record<string, any>; | ||
export type UntypedState = { _: never }; | ||
|
||
export class RestateGenericContainer extends GenericContainer { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding here is that you can't get away without adding a new public API? If not, then name this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unfortunately not. done ✅ |
||
constructor(version = "latest") { | ||
super(`docker.io/restatedev/restate:${version}`); | ||
} | ||
} | ||
export class StateProxy<TState extends TypedState> { | ||
constructor( | ||
private adminAPIBaseUrl: string, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
GenericContainer
was imported from two separate modules (restate-sdk-examples and restate-sdk-testcontainers), it created two distinct versions of the class—causing issues with testcontainers. To resolve this, I introduced RestateGenericContainer
as a single, unified reference.