test/

directory
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0

README

About

The code in this repository is a set of Ginkgo and Gomega based integration tests that execute commands using the sealer CLI.

Prerequisites

Before you run the tests, you'll need a sealer binary in your machine executable path . Follow the instructions here to get one.

Run the Tests

To run a single test or set of tests, you'll need the Ginkgo tool installed on your machine:

go get github.com/onsi/ginkgo/ginkgo

To install Sealer and prepare the test environment:

#install Sealer binaries
wget https://github.com/alibaba/sealer/releases/download/v0.8.4/sealer-v0.8.4-linux-amd64.tar.gz && \
tar zxvf sealer-v0.8.4-linux-amd64.tar.gz && mv sealer /usr/bin

#prepare test environment
export ACCESSKEYID={your AK}
export ACCESSKEYSECRET={your SK}
export RegionID={your region}
export REGISTRY_URL={your registry}
export REGISTRY_USERNAME={user name}
export REGISTRY_PASSWORD={password}
#default test image name: registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.19.8
export IMAGE_NAME={test image name}

To execute the entire test suite:

cd sealer && ginkgo test

You can then use the --focus option to run subsets of the test suite:

ginkgo --focus="sealer login" test

You can then use the -v option to print out default reporter as all specs begin:

ginkgo -v test

More ginkgo helpful info see:

ginkgo --help

Directories

Path Synopsis
suites

Jump to

Keyboard shortcuts

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