commit 32fbad7b9a955c52a7711141470b16105e838bcb
parent a055ecaacd4f90748ad7adf4f1b4e44493d36b69
Author: Florian Dold <florian@dold.me>
Date: Mon, 7 Oct 2024 15:39:12 +0200
remove legacy script
Diffstat:
2 files changed, 0 insertions(+), 62 deletions(-)
diff --git a/buildbot/check_tip_reserve.py b/buildbot/check_tip_reserve.py
@@ -1,55 +0,0 @@
-#!/usr/bin/env python3
-
-"""
-This script makes sure that the merchant backend instances used by the
-test/demo environment are created.
-
-We assume that the merchant backend is running, and that the "~/activate"
-file has been sourced to provide the right environment variables.
-"""
-
-import requests
-from os import environ
-from sys import exit
-from urllib.parse import urljoin
-from taler.util.amount import Amount
-
-def expect_env(name):
- val = environ.get(name)
- if not val:
- print(f"{name} not defined. Please source the ~/activate file.")
- exit(1)
- return val
-
-
-MERCHANT_BACKEND_BASE_URL = expect_env("TALER_ENV_MERCHANT_BACKEND")
-TALER_ENV_FRONTENDS_APITOKEN = expect_env("TALER_ENV_FRONTENDS_APITOKEN")
-TALER_CONFIG_CURRENCY = expect_env("TALER_CONFIG_CURRENCY")
-
-resp = requests.get(
- urljoin(MERCHANT_BACKEND_BASE_URL,
- "instances/survey/private/reserves"),
- headers = {"Authorization": f"Bearer {TALER_ENV_FRONTENDS_APITOKEN}"}
-)
-
-if resp.status_code != 200:
- print("merchant backend failed at providing a list of tip reserves!")
- exit(1)
-
-reserves = resp.json().get("reserves")
-if len(reserves) == 0:
- print("merchant backend has NO tip reserves active!")
- exit(1)
-
-max_amount = Amount(TALER_CONFIG_CURRENCY, 0, 0)
-for item in reserves:
- committed_amount = Amount.parse(item.get("committed_amount"))
- allocated_amount = Amount.parse(item.get("merchant_initial_amount"))
- confirmed_amount = Amount.parse(item.get("exchange_initial_amount"))
- if allocated_amount != confirmed_amount:
- print("WARNING: merchant_initial_amount != exchange_initial_amount")
- exit(1)
- remaining_amount = allocated_amount - committed_amount
- if remaining_amount > max_amount:
- max_amount = remaining_amount
-print("Max tip reserve: {}".format(max_amount))
diff --git a/buildbot/check_tip_reserve.sh b/buildbot/check_tip_reserve.sh
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-# Step for the BUILD_FACTORY running the 'test.taler.net' site.
-set -eu
-
-source "${HOME}/activate"
-./check_tip_reserve.py