Compare commits

..

3 commits

Author SHA1 Message Date
04b6904400
Update readme 2024-12-13 04:14:44 +01:00
b43cc8aa3e
acrate_database: Add connect tests 2024-12-13 04:06:26 +01:00
7e62707e1e
IDEA: Add clippy runConfig 2024-12-13 03:41:08 +01:00
6 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Clippy" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="buildProfileId" value="dev" />
<option name="command" value="clippy" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs />
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
<option name="allFeatures" value="false" />
<option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2">
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
</method>
</configuration>
</component>

View file

@ -0,0 +1,22 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Test" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="buildProfileId" value="dev" />
<option name="command" value="test" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs>
<env name="ACRATE_DATABASE_URL" value="postgres:///acrate?host=/run/postgresql/" />
</envs>
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
<option name="allFeatures" value="true" />
<option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2">
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
</method>
</configuration>
</component>

View file

@ -0,0 +1,22 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Test ignored" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="buildProfileId" value="dev" />
<option name="command" value="test -- --ignored" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs>
<env name="ACRATE_DATABASE_URL" value="postgres:///acrate?host=/run/postgresql/" />
</envs>
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
<option name="allFeatures" value="true" />
<option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2">
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
</method>
</configuration>
</component>

View file

@ -27,3 +27,8 @@ Federation database
### Binaries
- `acrate_rdserver`: Resource descriptor web server
### Extra
- `acrate_docker`: Utilities for deploying the acrate stack on Docker

View file

@ -19,11 +19,13 @@ micronfig = { version = "0.3.0", optional = true }
mime = "0.3.17"
pretty_env_logger = { version = "0.5.0", optional = true }
uuid = "1.11.0"
tokio = { version = "1.42.0", optional = true }
[features]
default = ["connect"]
bin = ["diesel_migrations", "pretty_env_logger", "connect"]
connect = ["micronfig"]
tests = ["tokio", "connect"]
[lib]
name = "acrate_database"

View file

@ -0,0 +1,15 @@
use acrate_database::connect::{connect_async, connect_sync};
#[test]
#[ignore]
fn test_connect_sync() -> diesel::ConnectionResult<()> {
connect_sync()?;
Ok(())
}
#[tokio::test]
#[ignore]
async fn test_connect_async() -> diesel::ConnectionResult<()> {
connect_async().await?;
Ok(())
}