package controllers
import (
"github.com/stretchr/testify/require"
"testing"
)
func TestHostify(t *testing.T) {
tests := [][2]string{
{
"https://test.infura.io/v1/123456",
"test.infura.io:443",
},
{
"http://test.infura.io/v1/123456",
"test.infura.io:80",
},
{
"test.infura.io/v1/123456",
"test.infura.io:80",
},
{
"test.infura.io",
"test.infura.io:80",
},
{
"http://sequencer:8545",
"sequencer:8545",
},
}
for _, tt := range tests {
t.Run(tt[0], func(t *testing.T) {
require.Equal(t, tt[1], Hostify(tt[0]))
})
}
}
-
Matthew Slipper authored
Converts Stackman into a Kube operator by adding the following: - The basic Operator scaffolding. Things like RBAC, the manifests for the Operator itself, etc. - CRDs for the DTL, Sequencer, Gas Oracle, Clique L1, batch submitter, deployer, and actors. To see how the CRDs get used, see the nightly env in the stacks repo: https://github.com/ethereum-optimism/stacks/tree/master/nightly Metadata: - Fixes ENG-1673
a1d8136e