-
Notifications
You must be signed in to change notification settings - Fork 3
[FAI-15921] Add e2e testings for Windows system in CI #131
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
Conversation
function getImagePlatform(image: string): string | undefined { | ||
if (image?.startsWith('farosai')) { | ||
return 'linux/amd64'; | ||
export function processDstDataByLine(line: string, cfg: FarosConfig): 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.
move up to the file. no change
/** | ||
* Filter out spec output | ||
*/ | ||
export function processSpecByLine(line: string): AirbyteSpec | undefined { |
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.
same. no change
options: Docker.ContainerCreateOptions, | ||
outputStream: Writable, | ||
inputStream?: ReadStream | PassThrough, | ||
): Promise<void> { |
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.
most functions have the same running docker codes. create a function to avoid duplicate codes
} | ||
if (stdinStream) { | ||
(stdinStream as any).destroy(); | ||
} |
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.
this is some weird ....stuff.
took me a day to debug what's going on.
what happened was that the CLI hangs even it runs fine without errors. but it just didn't exit at the end. And this only happens on Github Windows runner.
I tested on my own Windows machine and it didn't hang and exited successfully. I wonder if this has to do with Github Windows runner is not using Docker Desktop.
status: 'SUCCEEDED', | ||
}, | ||
}); | ||
docker.run = jest.fn().mockImplementation((_image, _command, outputStream: Writable, _createOptions) => { |
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.
instead of using docker.run()
to run for check src connection. I updated to use the same docker process as others (docker.createContainer
, container start/wait).
This also has to do with some we
1E79
ird Windows behavior that the stdout/stderr is printing some extra texts. I didn't debug anything deeper and just switch to use container.attach
to split stdout and stderr. it seems to fix it. ehhhhhhhh
overall, using docker.createContainer
and container start/wait is too hard to mock so just rely on integration tests
Co-authored-by: Chris Wu <chris@faros.ai>
Co-authored-by: Chris Wu <chris@faros.ai>
|
Description
Add e2e bash/powershell tests in github ci for Windows.
More info please check DEVELOPER.md testing section
Type of change