Skip to content

Commit

Permalink
Test TLS certificate generate on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbundalo committed Mar 13, 2024
1 parent 6e1f934 commit ee6a845
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/e2e-polybft-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
with:
go-version: 1.20.x
check-latest: true
- name: Setup TSL
run: openssl req -x509 -out localhost.crt -keyout localhost.key -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' -extensions EXT -config <(printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
run: sudo cp localhost.key /etc/ssl/private/localhost.key
run: sudo cp localhost.crt /usr/local/share/ca-certificates/localhost.crt
run: sudo update-ca-certificates
run: sudo chmod 644 /etc/ssl/private/localhost.key
- name: Run tests
run: make test-e2e-polybft
- name: Run tests failed
Expand Down
2 changes: 1 addition & 1 deletion e2e-polybft/e2e/jsonrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestE2E_JsonRPC(t *testing.T) {

cluster := framework.NewTestCluster(t, 4,
framework.WithPremine(types.Address(acct.Address())),
// framework.WithHTTPS("/etc/ssl/certs/localhost.pem", "/etc/ssl/private/localhost.key"),
framework.WithHTTPS("/etc/ssl/certs/localhost.pem", "/etc/ssl/private/localhost.key"),
)
defer cluster.Stop()

Expand Down

0 comments on commit ee6a845

Please sign in to comment.