lamassuiot

module
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MPL-2.0

README

Lamassu IoT

Coverage

Lamassu App

Lamassu is an IoT first PKI designed for industrial scenarios. This is the main code repository for Lamassu IoT where the product logic is being implemented. If you are looking for deployment instructions, please check the docs or the project's Docker Compose repository.

Running Unit tests

Each service has its own set of unit tests. To run them, you can use the following commands:

Note: In order to speed up the process, the tests are run in parallel by default.

Run Test
START=$(date +%s)
go run gotest.tools/gotestsum@latest --format github-actions ./pkg/... -coverpkg=./... -timeout 600s -coverprofile cover.out
END=$(date +%s)
DIFF=$(( $END - $START ))
echo "It took $DIFF seconds"
Get Coverage Badge
go tool cover -func cover.out | grep total | awk '{print substr($3, 1, length($3)-1)}' | .github/coverage-badge.sh
Get Coverage HTML Report
go tool cover -html=cover.out -o cover-report.html
Get Coverage SVG
go-cover-treemap -coverprofile cover.out > out.svg
go test -json -v  -coverprofile cover.out -coverpkg=./... ./pkg/v3/...
go tool cover -func=cover.out

ARM

CGO_ENABLED=1 GOARCH=arm64 go build -ldflags "-X main.sha1ver=git rev-parse HEAD -X main.buildTime=$now" -o ca cmd/ca/main.go

Jump to

Keyboard shortcuts

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