Skip to content

Commit

Permalink
Re-instantiate some Gofer testing
Browse files Browse the repository at this point in the history
Tests specific to Orcfax's changes to Gofer are reinstantiated.
Additional tests will be added (or removed) on a longer timeline.

Tests impacting CI that do not impact Orcfax's required functionality
have been removed.
  • Loading branch information
ross-spencer committed Feb 28, 2024
1 parent 6aa725f commit 78039fe
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 1,065 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
fail-fast: true
matrix:
os: ["ubuntu-latest", "macOS-latest"]
go: ["1.20.x", "1.21.x"]
go: ["1.21.x", "1.22.x"]
runs-on: ${{ matrix.os }}
steps:
- name: "checkout"
Expand All @@ -21,10 +21,7 @@ jobs:
- name: "fmt"
run: if [ "$(go fmt ./... | wc -l)" -gt 0 ]; then echo "go fmt failed, please run again locally"; exit 1; fi
if: matrix.os == 'ubuntu-latest'
- name: "test"
run: "go test ./..."
- name: "test datapoint and origin"
run: "go test github.com/orcfax/oracle-suite/pkg/datapoint/..."
- name: "vet"
run: "go vet ./..."
- run: "go install honnef.co/go/tools/cmd/staticcheck@latest"
- name: staticcheck
run: "staticcheck ./..."
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ gofer-release-sign: ## Build a gofer release..
goreleaser release --skip=publish --clean -f cmd/gofer/.goreleaser.yml

lint: ## Lint the source code (--ignore-errors to ignore errs)
@echo ignore errors with "--ignore-errors"
go fmt ./...
staticcheck ./...
golint ./...
Expand Down
9 changes: 5 additions & 4 deletions pkg/datapoint/orcfax_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import (

func TestReadBuildProperties(t *testing.T) {
ldFlags := debug.BuildSetting{
"-ldflags", "-s -w -X main.version=100.0.0-SNAPSHOT-057f3fc -X main.commit=057f3fc6318d1824148bf91de5ef674fe8b9a504 -X main.date=2024-01-29T19:14:07Z -X main.builtBy=goreleaser",
Key: "-ldflags",
Value: "-s -w -X main.version=100.0.0-SNAPSHOT-057f3fc -X main.commit=057f3fc6318d1824148bf91de5ef674fe8b9a504 -X main.date=2024-01-29T19:14:07Z -X main.builtBy=goreleaser",
}
res := parseBuildProperties([]debug.BuildSetting{ldFlags})
expected := value.BuildProperties{
"057f3fc6318d1824148bf91de5ef674fe8b9a504",
"100.0.0-SNAPSHOT-057f3fc",
"2024-01-29T19:14:07Z",
Commit: "057f3fc6318d1824148bf91de5ef674fe8b9a504",
Version: "100.0.0-SNAPSHOT-057f3fc",
Date: "2024-01-29T19:14:07Z",
}
if res != expected {
t.Errorf(
Expand Down
59 changes: 0 additions & 59 deletions pkg/transport/libp2p/crypto/ethkey/key_test.go

This file was deleted.

72 changes: 0 additions & 72 deletions pkg/transport/libp2p/crypto/ethkey/priv_test.go

This file was deleted.

64 changes: 0 additions & 64 deletions pkg/transport/libp2p/crypto/ethkey/pub_test.go

This file was deleted.

Loading

0 comments on commit 78039fe

Please sign in to comment.