Skip to content
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

Jest tests are not successful in gitlab pipeline #91

Closed
robert-cronin opened this issue Aug 25, 2020 · 3 comments · Fixed by #60
Closed

Jest tests are not successful in gitlab pipeline #91

robert-cronin opened this issue Aug 25, 2020 · 3 comments · Fixed by #60
Assignees
Labels
bug Something isn't working

Comments

@robert-cronin
Copy link
Contributor

The first issue is that the socket file at /run/user/0/polykey/S.polykey-agent cannot be accessed. I am not sure what underlying architecture the nodejs image has but this makes sense if the path doesn't exist.

One solution is to change the socket path for the tests to a temporary directory, which seems to have worked for the CLI tests.

The other issue is that our tests rely on mock CA certificates from a locally run CA, I am not sure what the fix for this would be other than to either run our CA system in the image (which would require a nix image) or use an external one

@robert-cronin robert-cronin added the bug Something isn't working label Aug 25, 2020
@robert-cronin robert-cronin self-assigned this Aug 25, 2020
@robert-cronin
Copy link
Contributor Author

We can actually just do the tests without a secure connection, testing gRPC secure vs. insecure is probably not relevant anyway.

Also, this type of testing might be more pertinent when we give polykey the ability to act as a CA.

In light of this, I might just make the testing conditional on the presence of the CA certificates so the pipeline can continue running successfully.

@robert-cronin
Copy link
Contributor Author

There was another issue that was occurring and that was the default shell was sometimes not set as process.env.SHELL in nodejs, so I gave it a default of sh if it couldn't find it. All tests are now passing in the nodejs docker image.

@robert-cronin
Copy link
Contributor Author

robert-cronin commented Aug 25, 2020

The gitlab-runner that gitlab uses seems to be different than the gitlab-runner that we can run in our local machine as the tests get stuck on gitlab. The tests run through just fine, it's just that some process prevents it from running through completely. The local gitlab-runner has no such issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant