-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1237 from openziti/remove-test-dir
Remove old utilities in test dir
- Loading branch information
Showing
22 changed files
with
297 additions
and
932 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: golangci-lint | ||
on: | ||
pull_request: | ||
permissions: | ||
contents: read | ||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
# pull-requests: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20.x' | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | ||
version: v1.53.3 | ||
|
||
# Optional: working directory, useful for monorepos | ||
# working-directory: somedir | ||
|
||
# Optional: golangci-lint command line arguments. | ||
args: --build-tags apitests | ||
|
||
# Optional: show only new issues if it's a pull request. The default value is `false`. | ||
# only-new-issues: true | ||
|
||
# Optional: if set to true then the all caching functionality will be complete disabled, | ||
# takes precedence over all other caching options. | ||
# skip-cache: true | ||
|
||
# Optional: if set to true then the action don't cache or restore ~/go/pkg. | ||
# skip-pkg-cache: true | ||
|
||
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build. | ||
# skip-build-cache: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
run: | ||
deadline: 8m | ||
skip-files: | ||
- ziti/cmd/edge/verify_ca.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Smoketest | ||
|
||
The ziti project uses a fablab based environment to run smoketests. These tests are run | ||
in github, but can be run locally as well. | ||
|
||
## Running smoketests locally | ||
|
||
First you must have an AWS account with permissions to create VPCs, setup security groups | ||
and run EC2 instances. If you are able to the run the AWS CLI using an access key and | ||
secret token, the smoketest should work as well. | ||
|
||
The following steps assume you are starting at the root of a cloned `ziti` repository. | ||
|
||
``` | ||
$ cd zititest | ||
$ go install ./... | ||
$ simple-transfer create | ||
$ ZITI_VERSION=0.0.0 simple-transfer up | ||
$ go test -v ./tests/... | ||
$ simple-transfer dispose | ||
``` | ||
|
||
## Debugging smoketests | ||
|
||
When a smoketest runs in Github, the fablab instance data is uploaded to s3. This includes | ||
everything need to work with the instance. If the smoketest run fails, the teardown will | ||
be delayed by half of an hour. In that half of an hour the instance data can be downloaded | ||
and the instance can be investigated. If you wish to prevent the instance from being | ||
torn down by the workflow, you can delete the instance data out of S3 and take responsiblility | ||
for cleaning it up yourself. | ||
|
||
The instance data is encrypted and requires a passphrase to decrypt. Here's an example | ||
script which can import a GH actions workflow instance into your local environment. | ||
|
||
``` | ||
aws s3 cp s3://ziti-smoketest-fablab-instances/simple-transfer-$1.tar.gz.gpg ${HOME}/Downloads/simple-transfer-$1.tar.gz.gpg | ||
FABLAB_PASSPHRASE=<passphrase goes here> simple-transfer import ${HOME}/Downloads/simple-transfer-$1.tar.gz.gpg | ||
rm ${HOME}/Downloads/simple-transfer-$1.tar.gz.gpg | ||
``` | ||
You would pass the workflow run number into the script. If you need the GPG passphrase, please ask. | ||
|
||
To delete the instance data out of S3, you would run: | ||
|
||
``` | ||
aws s3 rm s3://ziti-smoketest-fablab-instances/simple-transfer-$1.tar.gz.gpg | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.