Skip to content

Commit

Permalink
ud: Move test files around (#31)
Browse files Browse the repository at this point in the history
This separates voice tests from admin in preparation for
adding another teams file.
  • Loading branch information
backspace authored Oct 29, 2023
1 parent 59dbf0c commit 97d49d2
Show file tree
Hide file tree
Showing 27 changed files with 34 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-unmnemonic-devices-vrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up database
run: psql -f unmnemonic_devices_vrs/tests/api/fixtures/schema.sql postgres://postgres:postgres@localhost:5432/postgres
run: psql -f unmnemonic_devices_vrs/tests/fixtures/schema.sql postgres://postgres:postgres@localhost:5432/postgres
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- name: Run tests
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up database
run: psql -f unmnemonic_devices_vrs/tests/api/fixtures/schema.sql postgres://postgres:postgres@localhost:5432/postgres
run: psql -f unmnemonic_devices_vrs/tests/fixtures/schema.sql postgres://postgres:postgres@localhost:5432/postgres
- uses: dtolnay/[email protected]
with:
components: clippy
Expand All @@ -79,7 +79,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up database
run: psql -f unmnemonic_devices_vrs/tests/api/fixtures/schema.sql postgres://postgres:postgres@localhost:5432/postgres
run: psql -f unmnemonic_devices_vrs/tests/fixtures/schema.sql postgres://postgres:postgres@localhost:5432/postgres
- uses: dtolnay/[email protected]
- name: Install postgresql-client
run: sudo apt-get update && sudo apt-get install postgresql-client -y
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use crate::helpers::{get_with_twilio, post_with_twilio};
mod helpers {
include!("../helpers.rs");
}
use helpers::{get_with_twilio, post_with_twilio};

use select::{
document::Document,
Expand All @@ -13,8 +16,6 @@ use unmnemonic_devices_vrs::InjectableServices;
use wiremock::matchers::{body_string, method, path_regex, query_param};
use wiremock::{Mock, MockServer, ResponseTemplate};

// FIXME this isn’t an API!

#[sqlx::test(fixtures("schema"))]
async fn calls_list_when_empty(db: PgPool) {
let mock_twilio = MockServer::start().await;
Expand Down
1 change: 1 addition & 0 deletions unmnemonic_devices_vrs/tests/admin/fixtures
1 change: 1 addition & 0 deletions unmnemonic_devices_vrs/tests/admin/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod calls;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use crate::helpers::get;
mod helpers {
include!("../helpers.rs");
}
use helpers::get;

use select::{document::Document, predicate::Name};
use sqlx::PgPool;
Expand Down
1 change: 1 addition & 0 deletions unmnemonic_devices_vrs/tests/voice/fixtures
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
mod calls;
mod conferences;
mod helpers;
mod meetings;
mod recordings;
mod root;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
use crate::helpers::{get, post, RedirectTo};
mod helpers {
include!("../helpers.rs");
}
use helpers::{get, post, RedirectTo};

use select::{document::Document, predicate::Name};
use speculoos::prelude::*;
use sqlx::PgPool;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
use crate::helpers::{get, post, RedirectTo};
mod helpers {
include!("../helpers.rs");
}
use helpers::{get, post, RedirectTo};

use select::{document::Document, predicate::Name};
use serde::Serialize;
use speculoos::prelude::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
use crate::helpers::{get, post, RedirectTo};
mod helpers {
include!("../helpers.rs");
}
use helpers::{get, post, RedirectTo};

use select::{
document::Document,
predicate::{Descendant, Name},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
use crate::helpers::{get, get_with_twilio, post, RedirectTo};
mod helpers {
include!("../helpers.rs");
}
use helpers::{get, get_with_twilio, post, RedirectTo};

use select::{document::Document, predicate::Name};
use serde_json::json;
use speculoos::prelude::*;
Expand Down

0 comments on commit 97d49d2

Please sign in to comment.