Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
73038c88
Unverified
Commit
73038c88
authored
Oct 02, 2024
by
Sebastian Stammler
Committed by
GitHub
Oct 01, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-e2e/system/fjord: Fix check script test (#12231)
parent
28726a33
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
26 deletions
+20
-26
check_scripts_test.go
op-e2e/system/fjord/check_scripts_test.go
+20
-26
No files found.
op-e2e/system/fjord/check_scripts_test.go
View file @
73038c88
...
...
@@ -2,10 +2,12 @@ package fjord
import
(
"context"
"fmt"
"testing"
op_e2e
"github.com/ethereum-optimism/optimism/op-e2e"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
"github.com/ethereum-optimism/optimism/op-e2e/system/e2esys"
"github.com/ethereum/go-ethereum/common/hexutil"
...
...
@@ -23,47 +25,37 @@ func TestCheckFjordScript(t *testing.T) {
op_e2e
.
InitParallel
(
t
)
genesisActivation
:=
hexutil
.
Uint64
(
0
)
tests
:=
[]
struct
{
name
string
fjordActivation
*
hexutil
.
Uint64
expectErr
bool
fjord
bool
}{
{
name
:
"fjord_activated"
,
fjordActivation
:
&
genesisActivation
,
expectErr
:
false
,
},
{
name
:
"fjord_unactivated"
,
fjordActivation
:
nil
,
expectErr
:
true
,
},
{
fjord
:
true
},
{
fjord
:
false
},
}
for
_
,
tt
:=
range
tests
{
t
.
Run
(
tt
.
name
,
func
(
t
*
testing
.
T
)
{
op_e2e
.
InitParallel
(
t
)
tt
:=
tt
t
.
Run
(
fmt
.
Sprintf
(
"fjord=%t"
,
tt
.
fjord
),
func
(
t
*
testing
.
T
)
{
t
.
Parallel
()
log
:=
testlog
.
Logger
(
t
,
log
.
LevelInfo
)
cfg
:=
e2esys
.
DefaultSystemConfig
(
t
)
cfg
.
DeployConfig
.
L1CancunTimeOffset
=
&
genesisActivation
cfg
.
DeployConfig
.
L2GenesisRegolithTimeOffset
=
&
genesisActivation
cfg
.
DeployConfig
.
L2GenesisCanyonTimeOffset
=
&
genesisActivation
cfg
.
DeployConfig
.
L2GenesisDeltaTimeOffset
=
&
genesisActivation
cfg
.
DeployConfig
.
L2GenesisEcotoneTimeOffset
=
&
genesisActivation
cfg
.
DeployConfig
.
L2GenesisFjordTimeOffset
=
tt
.
fjordActivation
cfg
:=
e2esys
.
EcotoneSystemConfig
(
t
,
&
genesisActivation
)
if
tt
.
fjord
{
cfg
.
DeployConfig
.
L2GenesisFjordTimeOffset
=
ptr
(
hexutil
.
Uint64
(
cfg
.
DeployConfig
.
L2BlockTime
))
}
else
{
cfg
.
DeployConfig
.
L2GenesisFjordTimeOffset
=
nil
}
sys
,
err
:=
cfg
.
Start
(
t
)
require
.
NoError
(
t
,
err
,
"Error starting up system"
)
require
.
NoError
(
t
,
wait
.
ForNextBlock
(
context
.
Background
(),
sys
.
NodeClient
(
e2esys
.
RoleSeq
)))
checkFjordConfig
:=
&
fjordChecks
.
CheckFjordConfig
{
Log
:
log
,
L2
:
sys
.
NodeClient
(
"sequencer"
),
L2
:
sys
.
NodeClient
(
e2esys
.
RoleSeq
),
Key
:
sys
.
Cfg
.
Secrets
.
Alice
,
Addr
:
sys
.
Cfg
.
Secrets
.
Addresses
()
.
Alice
,
}
if
tt
.
expectErr
{
if
!
tt
.
fjord
{
err
=
fjordChecks
.
CheckRIP7212
(
context
.
Background
(),
checkFjordConfig
)
require
.
Error
(
t
,
err
,
"expected error for CheckRIP7212"
)
err
=
fjordChecks
.
CheckGasPriceOracle
(
context
.
Background
(),
checkFjordConfig
)
...
...
@@ -83,3 +75,5 @@ func TestCheckFjordScript(t *testing.T) {
})
}
}
func
ptr
[
T
any
](
t
T
)
*
T
{
return
&
t
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment