testbot

command
v2.281.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2021 License: Apache-2.0, MIT Imports: 15 Imported by: 0

README

Berty TestBot

TestBot is a simple Berty bot service.

Usage (in tests)

Its goal is to be used in end-to-end tests to check that everything runs smoothly including our code, our dependencies, and internet.

Usage (as a human)

  1. add the first bot as a contact
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
████ ▄▄▄▄▄ ███▀ ▀▄▄█▄█  ▄ ▀█▄▄▄▀█▀ █▄██▀▄█ ▄▄▄▄▄ ████
████ █   █ █▄▄███▄██▄ ▄    ▀  ▄▄█ ▄▄▄▀█ ▀█ █   █ ████
████ █▄▄▄█ ██▄██▄█▀   █  ▄▄▄  ▄██   ▀▄▄▄▄█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█ █ █▄▀ █▄▀ █ █▄█ █▄█▄█ █ █ █▄█▄▄▄▄▄▄▄████
████▄  █▄▄▄▄▄▄ ▀  ██   █▄ ▄  █▄▄▄▄█▄ ▄█▀█▄▄▀▀▀ █▀████
████▀ ▀▀ ▀▄▄█▀▀█▄ ▄█▀▀ ▄█ ▄▄  ▀█ ██▀▄▀▀▀ ▄██▄▄█ ▄████
████▄ ▄▀ ▀▄ ▀ █▄    █▄▄ █ █▄▀██ ▄██▄ ▄▄█▄ █▄ ▀█  ████
████▄█▄ ██▄ ▄█ ▀▄█▄ ▄▄▀▄█▄▄▄▄▄█▄ █    ▀ ▄▄██ █▄ ▄████
████ ▀ █ ▀▄▀▄▄ ▄▀█▄ ▄▄ █ ██▀ ▄██ ▄█▄▄▄▄███▄▄▄ █▄ ████
█████▄▄█▄ ▄██▄▄ ▄▄█ ▄▀▄▄█▀▄▀▄▀   ▄ ▀▄▀█ █ █ ▄▄▄ ▄████
████▄  ▄ ▄▄▄ ██▄▄▄▄██ ▄  ▄▄▄  ▄▄ ██ ▄█▄▀ ▄▄▄ ▀█ ▄████
████▀█▀  █▄█ ▄▀█▀ ▀▀█ ▄  █▄█  █▀ ▀▀  █▄  █▄█  █ ▄████
████▄▄█ ▄▄▄▄  ▄ ▄ ██ ▀▄▀ ▄  ▄▄█▄ ██ ▄▀▄█ ▄ ▄▄▄█▄ ████
████ ▄ ▀▄█▄▄▄▀█ ▄ ▄█▀█▄▀█▄██▄▄▄  ▀ ▄ █▀█ ▄▄   ▄ ▄████
█████▀█ ▀▄▄█▄▄  █▄ ▄█▄ █    ▄▀▄ ▄▀█▀▄▄▄▀▀████ ▀▀▀████
█████ █ ▄ ▄█ █▀ ▄█▄▀█ ▀▀  ▄▄█▄█ ▀ ██▀▀▄██▀ ▀█▀█  ████
████ ▀█ ▄█▄▄█▄ █ █▄ ▄ ███  ▀█ █ ▄██  ▄█▀▄█▄▄█▀▀  ████
█████▀▀▀ █▄  ▀▀█▀▀▄ ▄▀ ▀ ▄▄ █▄█▀█▀▄ ▀▀█▄ ▄▄▀▀▄▄  ████
████▄██▄▄█▄▄▀▄▄▄█  █▄█ █ ▄▄▄ █▄▄▄▄▄ ▄▄▄▀ ▄▄▄ █ █▀████
████ ▄▄▄▄▄ █ ██▀▀ ▀█▀█▄█ █▄█  ▄▄ █▀   ██ █▄█  █▄ ████
████ █   █ █▄█  ▄ ██ █▄█▄ ▄▄▄███ █▄▄ ▄██ ▄   ██ ▄████
████ █▄▄▄█ █ █▀ ▄▄▀█▀▀ ▄█▄█   █ ▄▀  ▀██▀ ██▄ ██▀█████
████▄▄▄▄▄▄▄█▄▄█▄█▄▄██▄▄▄▄█▄▄▄██▄▄██▄▄▄▄██▄█▄███▄▄████
█████████████████████████████████████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
https://berty.tech/id#contact/oZBLG8gg1RTwCW2u1AxA44dT1Lum2PAr2nBra6WdmTpozq7vdDkae9FjyCW3QZ86AE9pMAudh4GKTfNj1jELcdvtJy44Rbp/name=TestBot
  1. type /help

TODO: use embedmd to list commands here TODO: use embedmd to load qr code dynamically from /config/vars.yaml

Under the hood

  • requires two running berty daemon instances.
    • the first one is the "entrypoint"
    • the second one is used for some advanced workflows, i.e., multi-user-group, inviting, etc
  • this bot is designed for short testing session, it is often reset, and may forgot your shared conversations

Suggested Dev Environment

Open 3 terminals:

  1. berty daemon -node.listeners=/ip4/127.0.0.1/tcp/9092/grpc -store.dir=/tmp/testbot/1
  2. berty daemon -node.listeners=/ip4/127.0.0.1/tcp/9093/grpc -store.dir=/tmp/testbot/2
  3. testbot -debug

Deployment

See ../../../tool/deployments/testbot/

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL