Skip to content

CLI implementation for YugabyteDB Aeon.

License

Notifications You must be signed in to change notification settings

yugabyte/ybm-cli

Repository files navigation

ybm-cli

A CLI implementation for YugabyteDB Aeon.

Install with brew

brew install yugabyte/tap/ybm

Find more details on installation and configurationhere

Commands list

You can find all the commands documentedhere

Example workflows

You can find the example workflows documentedhere

Running unit tests locally:

This project usesGinkGofor testing.

Pre-requisite

  • Golangmust be installed on your machine.

Running All Tests:

To run all the tests, navigate to thecmddirectory and use the following command:

#This is mandatory, if you run $ go test from root of your project, it will run 0 tests.
cdcmd

#Run all tests
gotest

Running tests in a file:

You need to first install ginkgo via:

go install github /onsi/ginkgo/v2/ginkgo

This will install ginkgo wheregois installed e.g./Users/alice/go/.You can check the go installation path by runninggo env GOPATH.It's generally at$HOME/go.

To run a test, go to the directory where your test resides i.e.ybm-cli/cmdin this case.

If your tests in a file saycluster_test.goare like this.

var_=Describe("Cluster",func() {
Describe("Pausing cluster",func() {...}
Describe("Resuming cluster",func() {...}
Describe("Get Cluster",func() {...}
}

You can run the tests like:

$HOME/go/bin/ginkgo -v -focus="Cluster"#To run all tests related to Cluster.
$HOME/go/bin/ginkgo -v -focus="Pausing cluster|Resuming cluster"#To run all tests related to Pausing/Resuming cluster

It can be a regex as well inside focus or text from either ofContext,ItorDescribeblock. You can read more about ithere.