forked from lavina/lavina
use app version in projection-irc/tests
This commit is contained in:
parent
ff16a4f1b8
commit
dce3f1eacb
|
@ -30,7 +30,7 @@ mod cap;
|
|||
|
||||
use crate::cap::Capabilities;
|
||||
|
||||
const APP_VERSION: &str = concat!("lavina", "_", env!("CARGO_PKG_VERSION"));
|
||||
pub const APP_VERSION: &str = concat!("lavina", "_", env!("CARGO_PKG_VERSION"));
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct ServerConfig {
|
||||
|
|
|
@ -10,8 +10,8 @@ use tokio::net::TcpStream;
|
|||
|
||||
use lavina_core::repo::{Storage, StorageConfig};
|
||||
use lavina_core::{player::PlayerRegistry, room::RoomRegistry};
|
||||
use projection_irc::APP_VERSION;
|
||||
use projection_irc::{launch, read_irc_message, RunningServer, ServerConfig};
|
||||
|
||||
struct TestScope<'a> {
|
||||
reader: BufReader<ReadHalf<'a>>,
|
||||
writer: WriteHalf<'a>,
|
||||
|
@ -116,7 +116,14 @@ async fn scenario_basic() -> Result<()> {
|
|||
s.expect(":testserver 001 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 002 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 003 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 004 tester testserver lavina_0.0.2-dev r CFILPQbcefgijklmnopqrstvz").await?;
|
||||
s.expect(
|
||||
format!(
|
||||
":testserver 004 tester testserver {} r CFILPQbcefgijklmnopqrstvz",
|
||||
&APP_VERSION
|
||||
)
|
||||
.as_str(),
|
||||
)
|
||||
.await?;
|
||||
s.expect(":testserver 005 tester CHANTYPES=# :are supported by this server").await?;
|
||||
s.expect_nothing().await?;
|
||||
s.send("QUIT :Leaving").await?;
|
||||
|
@ -164,7 +171,14 @@ async fn scenario_cap_full_negotiation() -> Result<()> {
|
|||
s.expect(":testserver 001 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 002 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 003 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 004 tester testserver lavina_0.0.2-dev r CFILPQbcefgijklmnopqrstvz").await?;
|
||||
s.expect(
|
||||
format!(
|
||||
":testserver 004 tester testserver {} r CFILPQbcefgijklmnopqrstvz",
|
||||
&APP_VERSION
|
||||
)
|
||||
.as_str(),
|
||||
)
|
||||
.await?;
|
||||
s.expect(":testserver 005 tester CHANTYPES=# :are supported by this server").await?;
|
||||
s.expect_nothing().await?;
|
||||
s.send("QUIT :Leaving").await?;
|
||||
|
@ -206,7 +220,14 @@ async fn scenario_cap_short_negotiation() -> Result<()> {
|
|||
s.expect(":testserver 001 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 002 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 003 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 004 tester testserver lavina_0.0.2-dev r CFILPQbcefgijklmnopqrstvz").await?;
|
||||
s.expect(
|
||||
format!(
|
||||
":testserver 004 tester testserver {} r CFILPQbcefgijklmnopqrstvz",
|
||||
&APP_VERSION
|
||||
)
|
||||
.as_str(),
|
||||
)
|
||||
.await?;
|
||||
s.expect(":testserver 005 tester CHANTYPES=# :are supported by this server").await?;
|
||||
s.expect_nothing().await?;
|
||||
s.send("QUIT :Leaving").await?;
|
||||
|
@ -254,7 +275,14 @@ async fn scenario_cap_sasl_fail() -> Result<()> {
|
|||
s.expect(":testserver 001 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 002 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 003 tester :Welcome to testserver Server").await?;
|
||||
s.expect(":testserver 004 tester testserver lavina_0.0.2-dev r CFILPQbcefgijklmnopqrstvz").await?;
|
||||
s.expect(
|
||||
format!(
|
||||
":testserver 004 tester testserver {} r CFILPQbcefgijklmnopqrstvz",
|
||||
&APP_VERSION
|
||||
)
|
||||
.as_str(),
|
||||
)
|
||||
.await?;
|
||||
s.expect(":testserver 005 tester CHANTYPES=# :are supported by this server").await?;
|
||||
s.expect_nothing().await?;
|
||||
s.send("QUIT :Leaving").await?;
|
||||
|
|
Loading…
Reference in New Issue