Documentation ¶
Index ¶
- Constants
- Variables
- func CreateOutputDir(outputDir string) (string, error)
- func DeleteTestnet(group string) error
- func ExtractFarmGroup(summary *Summary) (string, error)
- func GetTestnetExpiration(group string) (string, error)
- func HasDeploymentSucceeded(jsonReport interface{}) error
- func KeepTestnetAlive(group string, expiration time.Time, outputFiles *OutputFilepath, ...) error
- func NewRootCmd() *cobra.Command
- func NewTestCmd() *cobra.Command
- func NewTestListCmd() *cobra.Command
- func NewTestnetCmd() *cobra.Command
- func NewTestnetCreateCmd() *cobra.Command
- func NewTestnetListCmd() *cobra.Command
- func ProcessLogs(reader io.ReadCloser, cmd *cobra.Command, outputFiles *OutputFilepath, ...) (string, error)
- func SetTestnetLifetime(group string, lifetimeSec int) error
- func TestCommandWithConfig(cfg *Config) func(cmd *cobra.Command, args []string) error
- func TestListCommand(cmd *cobra.Command, args []string) error
- func TestnetCommand(cfg *TestnetConfig) func(cmd *cobra.Command, args []string) error
- func TestnetListCommand(cmd *cobra.Command, args []string) error
- func ValidateTestnetCommand(cfg *TestnetConfig) func(cmd *cobra.Command, args []string) error
- type Config
- type OutputFilepath
- type Summary
- type TestDriverEvent
- type TestnetConfig
Constants ¶
const BN_AAAA_RECORDS_CREATED_EVENT = "bn_aaaa_records_created_event"
const FARM_VM_CREATED_EVENT = "farm_vm_created_event"
const GRAFANA_INSTANCE_CREATED_EVENT = "grafana_instance_created_event"
const IC_PROGRESS_CLOCK_CREATED_EVENT = "ic_progress_clock_created_event"
const IC_TOPOLOGY_EVENT = "ic_topology_created_event"
const INFRA_GROUP_NAME_CREATED_EVENT = "infra_group_name_created_event"
These events are collected from test-driver logs during the testnet deployment.
const JSON_REPORT_CREATED_EVENT = "json_report_created_event"
This event signals the end of testnet deployment.
const KIBANA_URL_CREATED_EVENT = "kibana_url_created_event"
const MAX_TOKEN_CAPACITY = 1024 * 1024
Maximum size used to buffer a token from stdout pipe (max characters in line).
const PROMETHEUS_VM_CREATED_EVENT = "prometheus_vm_created_event"
const VM_CONSOLE_LINK_CREATED_EVENT = "vm_console_link_created_event"
Variables ¶
var COLOCATE_TEST_SUFFIX = "_colocate"
var CYAN = "\033[0;36m"
var DATE_TIME_FORMAT = "2006-01-02_15-04-05.000"
Filenames are prefixed with this datetime format up to milliseconds.
var DEFAULT_RESULTS_DIR = "ict_testnets"
All output files are saved in this folder, if output-dir is not provided explicitly.
var DEFAULT_TEST_KEEPALIVE_MINS = 60
var FARM_API = FARM_BASE_URL + "/swagger-ui"
var FARM_BASE_URL = "https://farm.dfinity.systems"
var FARM_GROUP_KEEPALIVE_TTL_SEC = 90
var FUZZY_MATCHES_COUNT = 7
Max number of results displayed in the fuzzy search.
var FUZZY_SEARCH_BAG_SIZES = []int{2, 3, 4}
see https://github.com/schollz/closestmatch
var GREEN = "\033[1;32m"
var KEEPALIVE_PERIOD = 30 * time.Second
var MAX_TESTNET_LIFETIME_MINS = 1440 * 7
This restriction is defined in an ad-hoc way to avoid accidental resources abuse.
var NC = "\033[0m"
var PURPLE = "\033[1;35m"
var RED = "\033[1;31m"
var SUFFIX_LOG_FILE = "log.txt"
Logs are streamed into this file during testnet deployment.
var TESTNET_DEPLOYMENT_TIMEOUT_SEC = 4200
This defines timeout on the Bazel level.
var YELLOW = "\033[1;33m"
Functions ¶
func CreateOutputDir ¶
func DeleteTestnet ¶
func ExtractFarmGroup ¶
func GetTestnetExpiration ¶
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 NewTestCmd ¶
func NewTestListCmd ¶
func NewTestnetCmd ¶
func NewTestnetCreateCmd ¶
func NewTestnetListCmd ¶
func ProcessLogs ¶
func ProcessLogs(reader io.ReadCloser, cmd *cobra.Command, outputFiles *OutputFilepath, cfg *TestnetConfig) (string, error)
func SetTestnetLifetime ¶
func TestCommandWithConfig ¶
func TestnetCommand ¶
func TestnetCommand(cfg *TestnetConfig) func(cmd *cobra.Command, args []string) error
func ValidateTestnetCommand ¶
func ValidateTestnetCommand(cfg *TestnetConfig) func(cmd *cobra.Command, args []string) error
Types ¶
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
}