mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-10 06:54:12 +00:00
Fixing integration tests.
This commit is contained in:
parent
d767dd998e
commit
929f1d02b5
2 changed files with 5 additions and 21 deletions
|
@ -83,8 +83,8 @@ LEMMY_HOSTNAME=lemmy-epsilon:8581 \
|
|||
target/lemmy_server >/dev/null 2>&1 &
|
||||
|
||||
echo "wait for all instances to start"
|
||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8541/api/v1/site')" != "200" ]]; do sleep 1; done
|
||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8551/api/v1/site')" != "200" ]]; do sleep 1; done
|
||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8561/api/v1/site')" != "200" ]]; do sleep 1; done
|
||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8571/api/v1/site')" != "200" ]]; do sleep 1; done
|
||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8581/api/v1/site')" != "200" ]]; do sleep 1; done
|
||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8541/api/v2/site')" != "200" ]]; do sleep 1; done
|
||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8551/api/v2/site')" != "200" ]]; do sleep 1; done
|
||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8561/api/v2/site')" != "200" ]]; do sleep 1; done
|
||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8571/api/v2/site')" != "200" ]]; do sleep 1; done
|
||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8581/api/v2/site')" != "200" ]]; do sleep 1; done
|
||||
|
|
|
@ -43,8 +43,6 @@ fn user_updates_2020_04_02(conn: &PgConnection) -> Result<(), LemmyError> {
|
|||
.filter(local.eq(true))
|
||||
.load::<User_>(conn)?;
|
||||
|
||||
sql_query("alter table user_ disable trigger refresh_user").execute(conn)?;
|
||||
|
||||
for cuser in &incorrect_users {
|
||||
let keypair = generate_actor_keypair()?;
|
||||
|
||||
|
@ -78,8 +76,6 @@ fn user_updates_2020_04_02(conn: &PgConnection) -> Result<(), LemmyError> {
|
|||
User_::update(&conn, cuser.id, &form)?;
|
||||
}
|
||||
|
||||
sql_query("alter table user_ enable trigger refresh_user").execute(conn)?;
|
||||
|
||||
info!("{} user rows updated.", incorrect_users.len());
|
||||
|
||||
Ok(())
|
||||
|
@ -96,8 +92,6 @@ fn community_updates_2020_04_02(conn: &PgConnection) -> Result<(), LemmyError> {
|
|||
.filter(local.eq(true))
|
||||
.load::<Community>(conn)?;
|
||||
|
||||
sql_query("alter table community disable trigger refresh_community").execute(conn)?;
|
||||
|
||||
for ccommunity in &incorrect_communities {
|
||||
let keypair = generate_actor_keypair()?;
|
||||
|
||||
|
@ -124,8 +118,6 @@ fn community_updates_2020_04_02(conn: &PgConnection) -> Result<(), LemmyError> {
|
|||
Community::update(&conn, ccommunity.id, &form)?;
|
||||
}
|
||||
|
||||
sql_query("alter table community enable trigger refresh_community").execute(conn)?;
|
||||
|
||||
info!("{} community rows updated.", incorrect_communities.len());
|
||||
|
||||
Ok(())
|
||||
|
@ -142,8 +134,6 @@ fn post_updates_2020_04_03(conn: &PgConnection) -> Result<(), LemmyError> {
|
|||
.filter(local.eq(true))
|
||||
.load::<Post>(conn)?;
|
||||
|
||||
sql_query("alter table post disable trigger refresh_post").execute(conn)?;
|
||||
|
||||
for cpost in &incorrect_posts {
|
||||
let apub_id = make_apub_endpoint(EndpointType::Post, &cpost.id.to_string()).to_string();
|
||||
Post::update_ap_id(&conn, cpost.id, apub_id)?;
|
||||
|
@ -151,8 +141,6 @@ fn post_updates_2020_04_03(conn: &PgConnection) -> Result<(), LemmyError> {
|
|||
|
||||
info!("{} post rows updated.", incorrect_posts.len());
|
||||
|
||||
sql_query("alter table post enable trigger refresh_post").execute(conn)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -167,15 +155,11 @@ fn comment_updates_2020_04_03(conn: &PgConnection) -> Result<(), LemmyError> {
|
|||
.filter(local.eq(true))
|
||||
.load::<Comment>(conn)?;
|
||||
|
||||
sql_query("alter table comment disable trigger refresh_comment").execute(conn)?;
|
||||
|
||||
for ccomment in &incorrect_comments {
|
||||
let apub_id = make_apub_endpoint(EndpointType::Comment, &ccomment.id.to_string()).to_string();
|
||||
Comment::update_ap_id(&conn, ccomment.id, apub_id)?;
|
||||
}
|
||||
|
||||
sql_query("alter table comment enable trigger refresh_comment").execute(conn)?;
|
||||
|
||||
info!("{} comment rows updated.", incorrect_comments.len());
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue