Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Schmidt committed Sep 26, 2024
1 parent 382a4fa commit a862395
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 9 deletions.
23 changes: 15 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,18 @@ macos-pkg-notarize:
### make cleanall && make build-prerelease && make pkg-linux && make pkg-windows-zip && make macos-build-all && make macos-notarize-all
### make cleanall && make build-official && make pkg-linux && make pkg-windows-zip && make macos-build-all && make macos-notarize-all

ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif

# set var fail fast to value of env var or to true by default
FAIL_FAST ?= false
FAIL_FAST_FLAG := $(if $(FAIL_FAST),-failfast,)

GOLANGCI_LINT ?= $(GOBIN)/golangci-lint
GOLANGCI_LINT_VERSION ?= v1.58.0

.PHONY: test
test: integration unit
Expand All @@ -525,13 +535,7 @@ test-large: integration-large unit
.PHONY: integration
integration:
mkdir -p $(COV_INTEGRATION_DIR) || true
if [ "$(FAIL_FAST)" = "true" ]; then \
COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -failfast -tags=integration -timeout 30m ; \
else \
COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -tags=integration -timeout 30m ; \
fi

# COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -tags=integration -timeout 30m
COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test $(FAIL_FAST_FLAG) -tags=integration -timeout 30m ; \

.PHONY: integration-large
integration-large:
Expand All @@ -553,6 +557,9 @@ PHONY: view-coverage
view-coverage: $(COVERAGE_DIR)/total.cov
go tool cover -html=$(COVERAGE_DIR)/total.cov

$(GOLANGCI_LINT): $(GOBIN)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) $(GOLANGCI_LINT_VERSION)

PHONY: lint
list:
lint: $(GOLANGCI_LINT)
golangci-lint run
68 changes: 67 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,78 @@ asvec --help
- **Node visibility**: Listing nodes and important metadata i.e. version, peers,
etc.

## Configuration File
All connection related command-line flags are available

asvec.yml:
```
default:
host: 127.0.0.1:5000
credentials: admin:admin
tls-cafile: ./ca.crt
tls-certfile: ./cert.crt
tls-keyfile: ./key.key
```

## Issues

If you encounter an issue feel free to open a GitHub issue or discussion.
Otherwise, if you are an enterprise customer, please [contact support](https://aerospike.com/support/)

## Developing
Before pushing your changes run the tests and run the linter.

### Running Tests
- Unit: `make unit`
- Integrations: `make integration`
- Coverage (Unit + Integration): `make coverage`

### Running Linter
`make lint`

### VSCode Setup
#### Debugging
Add the following to your .vscode/launch.json
```
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "main.go",
"args": [
"--log-level", "debug", // example: runs `node ls` with debug log level
"node",
"ls"
],
"env": {
"ASVEC_HOST": "localhost:10000"
}
}
]
}
```

#### Testing
```
{
"go.testEnvVars": {
"ASVEC_TEST_SUITES": "0,1,2,3", # Allows the selection of tests suites based on index
"ASVEC_FAIL_FAST": "false" # Causes tests to fail immediately rather than finish the suites.
},
"go.testTags": "unit,integration,integration_large",
"go.buildFlags": [
"-tags=integration,unit,integration_large"
],
}
```

## License

This project is licensed under the Apache License. See the [LICENSE.md](./LICENSE) file for details.
This project is licensed under the Apache License. See the
[LICENSE.md](./LICENSE) file for details.


0 comments on commit a862395

Please sign in to comment.