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

Container build does not work when integration tests are removed #1344

Closed
josecelano opened this issue Mar 3, 2025 · 1 comment
Closed
Labels
Bug Incorrect Behavior Continuous Integration Workflows and Automation Portability Distribution to More Places

Comments

@josecelano
Copy link
Member

I have opened an PR to show the problem.

If you remove integration tests (tests folder), the container build fails:

#39 [test_debug 6/8] RUN mkdir -p /app/bin/; cp -l /test/src/target/debug/torrust-tracker /app/bin/torrust-tracker
#39 0.057 cp: cannot stat '/test/src/target/debug/torrust-tracker': No such file or directory
#39 ERROR: process "/bin/sh -c mkdir -p /app/bin/; cp -l /test/src/target/debug/torrust-tracker /app/bin/torrust-tracker" did not complete successfully: exit code: 1
------
 > [test_debug 6/8] RUN mkdir -p /app/bin/; cp -l /test/src/target/debug/torrust-tracker /app/bin/torrust-tracker:
0.057 cp: cannot stat '/test/src/target/debug/torrust-tracker': No such file or directory
------
./Containerfile:74
--------------------
  72 |     RUN cargo nextest run --workspace-remap /test/src/ --target-dir-remap /test/src/target/ --cargo-metadata /test/src/target/nextest/cargo-metadata.json --binaries-metadata /test/src/target/nextest/binaries-metadata.json
  73 |     
  74 | >>> RUN mkdir -p /app/bin/; cp -l /test/src/target/debug/torrust-tracker /app/bin/torrust-tracker
  75 |     RUN mkdir /app/lib/; cp -l $(realpath $(ldd /app/bin/torrust-tracker | grep "libz\.so\.1" | awk '{print $3}')) /app/lib/libz.so.1
  76 |     RUN chown -R root:root /app; chmod -R u=rw,go=r,a+X /app; chmod -R a+x /app/bin
--------------------
ERROR: failed to solve: process "/bin/sh -c mkdir -p /app/bin/; cp -l /test/src/target/debug/torrust-tracker /app/bin/torrust-tracker" did not complete successfully: exit code: 1
Reference
Check build summary support

I have had this problem in this or other repo before but I don't remember the reason. I've just opened the issue to track and document the problem.

@josecelano josecelano added Bug Incorrect Behavior Continuous Integration Workflows and Automation Portability Distribution to More Places labels Mar 3, 2025
@josecelano
Copy link
Member Author

I'm not going to waste time on this now, since I'm not planning to remove the integration tests. It's quite the opposite I would like to add some.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Incorrect Behavior Continuous Integration Workflows and Automation Portability Distribution to More Places
Projects
None yet
Development

No branches or pull requests

1 participant