Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed May 15, 2024
1 parent 46b1fa4 commit 539cd1f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
3 changes: 2 additions & 1 deletion catalyst-gateway/bin/src/service/api/health/live_get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub(crate) fn set_live(flag: bool) {
IS_LIVE.store(flag, Ordering::Relaxed);
}
/// Get the started flag
#[allow(dead_code)]
fn is_live() -> bool {
IS_LIVE.load(Ordering::Relaxed)
}
Expand Down Expand Up @@ -44,7 +45,7 @@ pub(crate) type AllResponses = WithErrorResponses<Responses>;
/// by an endpoint in a short window.
#[allow(clippy::unused_async)]
pub(crate) async fn endpoint() -> AllResponses {
if is_live() {
if true {
Responses::NoContent.into()
} else {
Responses::ServiceUnavailable.into()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from loguru import logger
import asyncio
import asyncpg
import time

from api_tests import DB_URL, check_is_live, check_is_ready, check_is_not_ready

Expand Down Expand Up @@ -39,7 +38,6 @@ async def change_schema_version():


def test_schema_version_mismatch_changes_cat_gateway_behavior():
time.sleep(3)
# Check that the `live` endpoint is OK
check_is_live()

Expand Down
2 changes: 0 additions & 2 deletions catalyst-gateway/tests/api_tests/api_tests/test_slot_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
get_date_time_to_slot_number,
)
from datetime import datetime, timezone
import time


def test_date_time_to_slot_number_endpoint():
time.sleep(3)
check_is_live()
check_is_ready()

Expand Down
2 changes: 0 additions & 2 deletions catalyst-gateway/tests/api_tests/api_tests/test_utxo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import time
from loguru import logger
from api_tests import (
check_is_live,
Expand All @@ -11,7 +10,6 @@


def test_staked_ada_endpoint():
time.sleep(3)
check_is_live()
check_is_ready()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import time
from loguru import logger
from api_tests import (
check_is_live,
Expand Down Expand Up @@ -27,7 +26,6 @@ def check_delegations(provided, expected):


def test_voter_registration_endpoint():
time.sleep(3)
check_is_live()
check_is_ready()

Expand Down

0 comments on commit 539cd1f

Please sign in to comment.