Skip to content

Commit 1ce717f

Browse files
committed
WIP
1 parent d28e81a commit 1ce717f

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

espresso/devnet-tests/batcher_restart_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,25 @@ import (
66

77
"github.com/ethereum/go-ethereum"
88
"github.com/stretchr/testify/require"
9+
10+
env "github.com/ethereum-optimism/optimism/espresso/environment"
911
)
1012

1113
func TestBatcherRestart(t *testing.T) {
14+
testRestart(t, false)
15+
}
16+
17+
func TestEnclaveRestart(t *testing.T) {
18+
env.RunOnlyWithEnclave(t)
19+
testRestart(t, true)
20+
}
21+
22+
func testRestart(t *testing.T, tee bool) {
1223
ctx, cancel := context.WithCancel(context.Background())
1324
defer cancel()
1425

1526
d := NewDevnet(ctx, t)
27+
d.tee = tee
1628
require.NoError(t, d.Up())
1729
defer func() {
1830
require.NoError(t, d.Down())

espresso/devnet-tests/devnet_tools.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727

2828
type Devnet struct {
2929
ctx context.Context
30+
tee bool
3031
secrets secrets.Secrets
3132
outageTime time.Duration
3233
successTime time.Duration
@@ -66,9 +67,16 @@ func NewDevnet(ctx context.Context, t *testing.T) *Devnet {
6667
}
6768

6869
func (d *Devnet) Up() (err error) {
70+
var profile string
71+
if d.tee {
72+
profile = "tee"
73+
} else {
74+
profile = "default"
75+
}
76+
6977
cmd := exec.CommandContext(
7078
d.ctx,
71-
"docker", "compose", "up", "-d",
79+
"docker", "compose", "--profile", profile, "up", "-d",
7280
)
7381
buf := new(bytes.Buffer)
7482
cmd.Stderr = buf

0 commit comments

Comments
 (0)