-
Notifications
You must be signed in to change notification settings - Fork 644
/
describe.go
41 lines (33 loc) · 1.29 KB
/
describe.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package e2e
import (
ginkgo "github.com/onsi/ginkgo/v2"
)
const (
// For label usage in ginkgo invocation, see: https://onsi.github.io/ginkgo/#spec-labels
// Label for filtering a test that is not primarily a C-Chain test
// but nonentheless uses the C-Chain. Intended to support
// execution of all C-Chain tests by the coreth repo in an e2e job.
UsesCChainLabel = "uses-c"
)
// DescribeXChain annotates the tests for X-Chain.
func DescribeXChain(text string, args ...interface{}) bool {
args = append(args, ginkgo.Label("x"))
return ginkgo.Describe("[X-Chain] "+text, args...)
}
// DescribeXChainSerial annotates serial tests for X-Chain.
func DescribeXChainSerial(text string, args ...interface{}) bool {
args = append(args, ginkgo.Serial)
return DescribeXChain(text, args...)
}
// DescribePChain annotates the tests for P-Chain.
func DescribePChain(text string, args ...interface{}) bool {
args = append(args, ginkgo.Label("p"))
return ginkgo.Describe("[P-Chain] "+text, args...)
}
// DescribeCChain annotates the tests for C-Chain.
func DescribeCChain(text string, args ...interface{}) bool {
args = append(args, ginkgo.Label("c"))
return ginkgo.Describe("[C-Chain] "+text, args...)
}