Skip to content

Commit

Permalink
chore: enable unit tests (#159)
Browse files Browse the repository at this point in the history
* enable unit tests

* fix failing tests
  • Loading branch information
LexLuthr authored Aug 20, 2024
1 parent 45373f7 commit 938a611
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,11 @@ workflows:
target: "./itests/curio_test.go"
get-params: true
resource_class: 2xlarge
- test:
name: test-all
requires:
- build
suite: test-all
target: "`go list ./... | grep -v curio/itests`"
get-params: true
resource_class: 2xlarge
2 changes: 1 addition & 1 deletion harmony/harmonydb/sql_cclist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func TestCCList(t *testing.T) {
// this tests outputs the cc cid list defined in 20240611-snap-pipeline.sql

numProofs := abi.RegisteredSealProof_StackedDrg64GiBV1_1_Feat_SyntheticPoRep + 1
numProofs := abi.RegisteredSealProof_StackedDrg64GiBV1_2_Feat_NiPoRep + 1

pstrs := make([]string, numProofs)

Expand Down
11 changes: 6 additions & 5 deletions lib/proofpaths/cachefiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,17 @@ func LayerFileName(layer int) string {

func SDRLayers(spt abi.RegisteredSealProof) (int, error) {
switch spt {
case abi.RegisteredSealProof_StackedDrg2KiBV1, abi.RegisteredSealProof_StackedDrg2KiBV1_1, abi.RegisteredSealProof_StackedDrg2KiBV1_1_Feat_SyntheticPoRep:
case abi.RegisteredSealProof_StackedDrg2KiBV1, abi.RegisteredSealProof_StackedDrg2KiBV1_1, abi.RegisteredSealProof_StackedDrg2KiBV1_1_Feat_SyntheticPoRep, abi.RegisteredSealProof_StackedDrg2KiBV1_2_Feat_NiPoRep:
return 2, nil
case abi.RegisteredSealProof_StackedDrg8MiBV1, abi.RegisteredSealProof_StackedDrg8MiBV1_1, abi.RegisteredSealProof_StackedDrg8MiBV1_1_Feat_SyntheticPoRep:
case abi.RegisteredSealProof_StackedDrg8MiBV1, abi.RegisteredSealProof_StackedDrg8MiBV1_1, abi.RegisteredSealProof_StackedDrg8MiBV1_1_Feat_SyntheticPoRep, abi.RegisteredSealProof_StackedDrg8MiBV1_2_Feat_NiPoRep:
return 2, nil
case abi.RegisteredSealProof_StackedDrg512MiBV1, abi.RegisteredSealProof_StackedDrg512MiBV1_1, abi.RegisteredSealProof_StackedDrg512MiBV1_1_Feat_SyntheticPoRep:
case abi.RegisteredSealProof_StackedDrg512MiBV1, abi.RegisteredSealProof_StackedDrg512MiBV1_1, abi.RegisteredSealProof_StackedDrg512MiBV1_1_Feat_SyntheticPoRep, abi.RegisteredSealProof_StackedDrg512MiBV1_2_Feat_NiPoRep:
return 2, nil
case abi.RegisteredSealProof_StackedDrg32GiBV1, abi.RegisteredSealProof_StackedDrg32GiBV1_1, abi.RegisteredSealProof_StackedDrg32GiBV1_1_Feat_SyntheticPoRep:
case abi.RegisteredSealProof_StackedDrg32GiBV1, abi.RegisteredSealProof_StackedDrg32GiBV1_1, abi.RegisteredSealProof_StackedDrg32GiBV1_1_Feat_SyntheticPoRep, abi.RegisteredSealProof_StackedDrg32GiBV1_2_Feat_NiPoRep:
return 11, nil
case abi.RegisteredSealProof_StackedDrg64GiBV1, abi.RegisteredSealProof_StackedDrg64GiBV1_1, abi.RegisteredSealProof_StackedDrg64GiBV1_1_Feat_SyntheticPoRep:
case abi.RegisteredSealProof_StackedDrg64GiBV1, abi.RegisteredSealProof_StackedDrg64GiBV1_1, abi.RegisteredSealProof_StackedDrg64GiBV1_1_Feat_SyntheticPoRep, abi.RegisteredSealProof_StackedDrg64GiBV1_2_Feat_NiPoRep:
return 11, nil

default:
return 0, fmt.Errorf("unsupported proof type: %v", spt)
}
Expand Down

0 comments on commit 938a611

Please sign in to comment.