-
Notifications
You must be signed in to change notification settings - Fork 86
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
add testing utilities #122
Comments
I think it's enough if you simply install the service once, mark it on-demand so the system doesn't autostart it. So then you don't have to repeat steps 3 and 7 on each build which is tedious. Then perhaps automate your flow using scripts or command aliases, i.e: runas /user:admin net stop <my_service>
cargo build
runas /user:admin net start <my_service> I am not sure if Although I think I used to run cargo build and all that as admin and that was fine for development purposes. When you're done you have to wipe the Since there is no stdout in window services, I'd typically make windows service log to file and then stream it with some of unix tools like tail -F log.txt |
@pronebird thank you that's a big help. I'm logging to a file in order to see what's happening, but i'm finding any logging within the control command event handler isn't firing. Should i expect logging to work there? see https://github.com/danieleades/grpc-service/blob/main/src/main.rs and #116 (comment) |
@danieleades No it's doesn't copy it anywhere and this can be verified by locating your service in Services pane on Windows, or using the SC utility tool to print out the service entry:
For creating a service manually with admin shell, you can use the following command:
(you have to fix the absolute path to binary) Then to delete the service:
In regards of your program, I am not quite sure why you don't receive the events. |
i'm finding the development loop pretty challenging while creating a service.
That's probably on me for the most part- i'm very new to this framework.
Here's what i'm doing now-
that's pretty painful to be honest, when all i really want is a semi accurate mock of the service manager to start my service entrypoint, wait a second or so and then stop it again.
Is there a better approach i should be using? Or should this library provide a service manager mock for testing purposes?
The text was updated successfully, but these errors were encountered: