cmd

package
v0.0.0-...-d63549e Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const BN_AAAA_RECORDS_CREATED_EVENT = "bn_aaaa_records_created_event"
View Source
const FARM_VM_CREATED_EVENT = "farm_vm_created_event"
View Source
const GRAFANA_INSTANCE_CREATED_EVENT = "grafana_instance_created_event"
View Source
const IC_PROGRESS_CLOCK_CREATED_EVENT = "ic_progress_clock_created_event"
View Source
const IC_TOPOLOGY_EVENT = "ic_topology_created_event"
View Source
const INFRA_GROUP_NAME_CREATED_EVENT = "infra_group_name_created_event"

These events are collected from test-driver logs during the testnet deployment.

View Source
const JSON_REPORT_CREATED_EVENT = "json_report_created_event"

This event signals the end of testnet deployment.

View Source
const KIBANA_URL_CREATED_EVENT = "kibana_url_created_event"
View Source
const MAX_TOKEN_CAPACITY = 1024 * 1024

Maximum size used to buffer a token from stdout pipe (max characters in line).

View Source
const PROMETHEUS_VM_CREATED_EVENT = "prometheus_vm_created_event"
View Source
const VM_CONSOLE_LINK_CREATED_EVENT = "vm_console_link_created_event"

Variables

View Source
var COLOCATE_TEST_SUFFIX = "_colocate"
View Source
var CYAN = "\033[0;36m"
View Source
var DATE_TIME_FORMAT = "2006-01-02_15-04-05.000"

Filenames are prefixed with this datetime format up to milliseconds.

View Source
var DEFAULT_RESULTS_DIR = "ict_testnets"

All output files are saved in this folder, if output-dir is not provided explicitly.

View Source
var DEFAULT_TEST_KEEPALIVE_MINS = 60
View Source
var FARM_API = FARM_BASE_URL + "/swagger-ui"
View Source
var FARM_BASE_URL = "https://farm.dfinity.systems"
View Source
var FARM_GROUP_KEEPALIVE_TTL_SEC = 90
View Source
var FUZZY_MATCHES_COUNT = 7

Max number of results displayed in the fuzzy search.

View Source
var FUZZY_SEARCH_BAG_SIZES = []int{2, 3, 4}

see https://github.com/schollz/closestmatch

View Source
var GREEN = "\033[1;32m"
View Source
var KEEPALIVE_PERIOD = 30 * time.Second
View Source
var MAX_TESTNET_LIFETIME_MINS = 1440 * 7

This restriction is defined in an ad-hoc way to avoid accidental resources abuse.

View Source
var NC = "\033[0m"
View Source
var PURPLE = "\033[1;35m"
View Source
var RED = "\033[1;31m"
View Source
var SUFFIX_LOG_FILE = "log.txt"

Logs are streamed into this file during testnet deployment.

View Source
var TESTNET_DEPLOYMENT_TIMEOUT_SEC = 4200

This defines timeout on the Bazel level.

View Source
var YELLOW = "\033[1;33m"

Functions

func CreateOutputDir

func CreateOutputDir(outputDir string) (string, error)

func DeleteTestnet

func DeleteTestnet(group string) error

func ExtractFarmGroup

func ExtractFarmGroup(summary *Summary) (string, error)

func GetTestnetExpiration

func GetTestnetExpiration(group string) (string, error)

func HasDeploymentSucceeded

func HasDeploymentSucceeded(jsonReport interface{}) error

func KeepTestnetAlive

func KeepTestnetAlive(group string, expiration time.Time, outputFiles *OutputFilepath, cfg *TestnetConfig, cmd *cobra.Command) error

func NewRootCmd

func NewRootCmd() *cobra.Command

func NewTestCmd

func NewTestCmd() *cobra.Command

func NewTestListCmd

func NewTestListCmd() *cobra.Command

func NewTestnetCmd

func NewTestnetCmd() *cobra.Command

func NewTestnetCreateCmd

func NewTestnetCreateCmd() *cobra.Command

func NewTestnetListCmd

func NewTestnetListCmd() *cobra.Command

func ProcessLogs

func ProcessLogs(reader io.ReadCloser, cmd *cobra.Command, outputFiles *OutputFilepath, cfg *TestnetConfig) (string, error)

func SetTestnetLifetime

func SetTestnetLifetime(group string, lifetimeSec int) error

func TestCommandWithConfig

func TestCommandWithConfig(cfg *Config) func(cmd *cobra.Command, args []string) error

func TestListCommand

func TestListCommand(cmd *cobra.Command, args []string) error

func TestnetCommand

func TestnetCommand(cfg *TestnetConfig) func(cmd *cobra.Command, args []string) error

func TestnetListCommand

func TestnetListCommand(cmd *cobra.Command, args []string) error

func ValidateTestnetCommand

func ValidateTestnetCommand(cfg *TestnetConfig) func(cmd *cobra.Command, args []string) error

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

type OutputFilepath

type OutputFilepath struct {
	// contains filtered or unexported fields
}

func NewOutputFilepath

func NewOutputFilepath(outputDir string, time time.Time) *OutputFilepath

type Summary

type Summary struct {
	FarmGroup       interface{}   `json:"farm"`
	KibanaUrl       interface{}   `json:"kibana_url"`
	IcTopology      interface{}   `json:"ic_topology"`
	VmConsoleLinks  []interface{} `json:"vm_console_links"`
	BnAAAARecords   interface{}   `json:"bn_aaaa_records"`
	PrometheusVm    interface{}   `json:"prometheus"`
	GrafanaLink     interface{}   `json:"grafana"`
	IcProgressClock interface{}   `json:"progress_clock"`
	FarmVMs         []interface{} `json:"farm_vms"`
}

Testnet config summary published to json file.

type TestDriverEvent

type TestDriverEvent struct {
	EventName string      `json:"event_name"`
	Body      interface{} `json:"body"`
}

Definition of this event is aligned with rs/tests/src/driver/log_events.rs

func TryExtractEvent

func TryExtractEvent(logLine string) (TestDriverEvent, error)

type TestnetConfig

type TestnetConfig struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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