From 260fd7940d111ecebb3b089f8949f5ed5537d2b5 Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Tue, 21 Apr 2020 15:57:01 +0100 Subject: [PATCH] Update healthcheck page - remove travis references Also remove travis references from the repository --- Makefile | 2 +- app/status/healthcheck.py | 3 +-- app/version.py.dist | 4 +--- tests/app/status/test_status.py | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 6acaa0447..c78f20b93 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ help: .PHONY: generate-version-file generate-version-file: ## Generates the app version file - @echo -e "__travis_commit__ = \"${GIT_COMMIT}\"\n__time__ = \"${DATE}\"\n__travis_job_number__ = \"${BUILD_NUMBER}\"\n__travis_job_url__ = \"${BUILD_URL}\"" > ${APP_VERSION_FILE} + @echo -e "__git_commit__ = \"${GIT_COMMIT}\"\n__time__ = \"${DATE}\"" > ${APP_VERSION_FILE} .PHONY: test test: generate-version-file ## Run tests diff --git a/app/status/healthcheck.py b/app/status/healthcheck.py index 49f80980e..995c89e5b 100644 --- a/app/status/healthcheck.py +++ b/app/status/healthcheck.py @@ -19,8 +19,7 @@ def show_status(): else: return jsonify( status="ok", # This should be considered part of the public API - travis_commit=version.__travis_commit__, - travis_build_number=version.__travis_job_number__, + git_commit=version.__git_commit__, build_time=version.__time__, db_version=get_db_version()), 200 diff --git a/app/version.py.dist b/app/version.py.dist index 295df522a..f328d7fcd 100644 --- a/app/version.py.dist +++ b/app/version.py.dist @@ -1,4 +1,2 @@ -__travis_commit__ = "" +__git_commit__ = "" __time__ = "" -__travis_job_number__ = "" -__travis_job_url__ = "" diff --git a/tests/app/status/test_status.py b/tests/app/status/test_status.py index e75639289..7da76fc31 100644 --- a/tests/app/status/test_status.py +++ b/tests/app/status/test_status.py @@ -11,8 +11,7 @@ def test_get_status_all_ok(client, notify_db_session, path): resp_json = json.loads(response.get_data(as_text=True)) assert resp_json['status'] == 'ok' assert resp_json['db_version'] - assert resp_json['travis_commit'] - assert resp_json['travis_build_number'] + assert resp_json['git_commit'] assert resp_json['build_time']